Skip to content

🚀 Feature Request: Aggregator / API failover #430

@toderash

Description

@toderash

Describe the problem that needs this feature

WP Admin slows to a crawl waiting on timeouts for update checks. As described in #420 this is a problem in Core, and is also triggered when api.fair.pm is unreachable. Similar to (but not same as) #345 we should deal with this in FAIR Connect to add resilience & flexibility and to avoid temporary impairment of sites from failed API checks. @namithj reports routing issues from India to api.aspirecloud.net (routing, not an AC issue) which is persistent, but a solution might be incorporated here.

The FAIR Protocol anticipates this but it's not been built into Connect. This could built to include support for paid plugins and private aggregator/repos, or possibly direct connections to a trusted Beacon.

Describe the solution you'd like

Propose we add an array of supported aggregator API URIs, which is something we want anyway so that multiple aggregator subscriptions could be maintained - currently it's configurable, but limited to a single aggregator. A robust solution should support the following:

  • select between aggregators based on latency & download speed, and set an aggregator as primary
  • select other aggregator(s) as additional or failover to a selected aggregator, so we might have something like:
    • Aggregator-One --> primary
    • Aggregator-Two --> failover-for --> Aggregator-One
    • Aggregator-Three --> supplemental
    • Aggregator-Four --> failover-for --> Aggregator-Three
  • support for .org could be enabled as something like:
    • WordPress.org --> failover-for --> Aggregator-One
    • WordPress.org --> supplemental
  • direct Beacon support could be added as well for trusted beacons, perhaps operated by an agency or as part of an internal CI/CD pipeline:
    • Beacon-One --> beacon
    • Beacon-Two --> beacon

When no API is available, there are two other UX considerations:

  • add a "Package List not Retrieved" message on the installer pages with a "Retry" button when no API is immediately available
  • disable "update" links on the Plugin & Theme listing pages when an API is not immediately available

Potentially trigger this when a dns/preconnect fails for the URL: try failover if set, then move on if that fails.

On my Linux desktop, the related functionality (for inspo) looks like this:

  • Select Preferred Repo Mirror:

(Usually those speeds are all faster, but I'm on a slower wifi connection atm)

Image
  • Select Other Sources:
Image
  • These could be private repos (aggregators in our case) and should support authentication. This would enable display of results from supplemental aggregators such as plugin vendors in a separate tab, similar to WooCommerce (see below), but with a consistent UI.
Image

Describe alternatives you've considered

n/a

Discussion / Planning

Two somewhat-related issues are tagged above. Tagging some discussion from here on GH & over in Slack: @johnbillion @javiercasares @namithj

As the above is moderately ambitious, it could be split up into sub-issues and rolled out in stages, starting with failover protections so a site doesn't suffer if it can't reach the update API for any reason, including lack of in-flight wifi or failure of your solar-powered Raspberry Pi API server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionNeeds discussion and decision before moving forward.

    Projects

    Status

    No status

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions