Apache APISIX high availability

Apache APISIX high availability depends on which deployment mode you choose, how the etcd cluster is run and how gateway nodes and upstreams fail. This page sets out the decisions, build order, effort drivers and tests to settle before go-live.

On this page

How to design Apache APISIX high availability without a single point of failure

Availability for an APISIX gateway comes from three decisions: the deployment mode, the etcd cluster behind it, and how upstream failures are detected. APISIX supports three modes according to its deployment modes documentation. In traditional mode, data plane and control plane run together and share etcd. In decoupled mode, the data plane and control plane run separately but still share one etcd cluster. In standalone mode, there is no etcd at all: each gateway node loads its configuration from a YAML or JSON file, or through the Admin API, and hot-reloads changes. The mode you pick decides which components can fail and still stop the gateway from serving traffic, so the design starts there, not with node counts.

The harder part is that the control path is part of the availability story. In traditional and decoupled modes, the Admin API listens on port 9180 and client traffic on port 9080, and the gateway depends on etcd for its configuration. If etcd loses quorum, configuration changes stop, and you must confirm with your own tests whether running nodes keep serving with their last known configuration during that outage. Standalone mode removes etcd from the path but moves the risk to file or API distribution, where a bad configuration pushed to every node at once becomes the failure. Treat each config change as a deployment with its own rollout, validation and rollback, and confirm with the vendor how the Admin API and etcd are protected, because both sit on the control path that keeps the gateway correct.

Upstream health checks determine whether a failed backend is removed from rotation or keeps receiving requests. Decide which failures count, such as timeouts, connection errors or specific status codes, and how many consecutive failures are needed before a node is marked unhealthy and when it returns. Then test those settings against a real backend failure in a staging environment, including a partial failure where one of several upstream nodes is slow rather than down. Plan the gateway fleet with at least two nodes per failure domain, placed behind a load balancer you control, and verify that losing one node, one zone or one etcd member leaves traffic flowing. Ask your implementation partner or your own platform team to write those failure tests into the design before go-live.

Which Apache APISIX high availability components can fail and what each one carries

An APISIX deployment is split into components that fail in different ways. Some stop client traffic immediately, while others only block configuration changes until they recover. Knowing which is which tells you where to add redundancy and which checks to run before go-live.

Gateway data plane nodes

Gateway nodes receive client traffic on port 9080 and apply routes, plugins and upstream selection. If one node fails, requests already routed to it are lost, but the load balancer in front of the remaining nodes should send new traffic elsewhere. A failed node does not stop the others from serving traffic that uses the same configuration. Confirm that enough nodes remain to carry peak load after one node is lost, and that health checks on the load balancer remove the failed node quickly.

Deployment modes docs

Control plane and Admin API

In traditional and decoupled modes, the Admin API on port 9180 accepts configuration changes and writes them to etcd. If the control plane is unavailable, existing gateway nodes keep serving traffic with the configuration they last loaded, but you cannot create, change or remove routes, consumers or plugins until it returns. Do not expose port 9180 to general networks. Test whether your change pipeline can wait out a control plane outage and document who can restore it.

The etcd cluster

etcd holds the configuration that data plane nodes read in traditional and decoupled modes. Losing quorum blocks writes, and an etcd outage can also stop configuration from reaching nodes that restart. Build the cluster with an odd number of members across failure domains, back it up, and rehearse restoring it. Confirm with your platform team how etcd is monitored and who owns its upgrades, since APISIX depends on it for every configuration change.

File-based configuration in standalone mode

In standalone mode there is no etcd, and each node reads conf/apisix.yaml or conf/apisix.json, checking for changes every second. A bad file edit can break routing on every node that receives it, so the failure risk shifts from infrastructure to change management. Nodes keep their last good configuration if the file is unavailable, but a node restarted with a missing or invalid file will not serve the intended routes. Keep the file under version control and deploy it through a staged rollout.

Standalone mode docs

Load balancers in front of gateways

Clients usually reach gateway nodes through a load balancer, DNS record or cloud front end that APISIX does not manage. If this layer fails, the gateway can be healthy and still unreachable, so it is often the first single point of failure to find in review. Confirm that the load balancer is itself redundant, that its health checks match the gateway's listening ports, and that TLS certificates are managed consistently across the pool.

Health-checked upstreams

Upstreams are the backend services APISIX forwards requests to, and health checks let the gateway stop sending traffic to backends that fail. A health check that is too loose keeps routing requests to a dead service, while one that is too strict can remove healthy backends during brief load spikes. Define checks for each upstream, test how a failing backend is ejected and readmitted, and confirm the thresholds with your service owners before relying on them.

Decoupled APISIX keeps traffic flowing when the control plane or etcd fails

Client requests enter a load balancer and reach several APISIX data plane nodes, which proxy them to upstream services on port 9080. The control plane exposes the Admin API on port 9180 and writes configuration to a shared etcd cluster, which each data plane node reads from. Check the trust boundaries: clients should reach only the gateway listener, and only the control plane should write to etcd. If the control plane or etcd becomes unavailable, data plane nodes keep serving traffic with the configuration they already hold, but configuration changes stop until those components recover.

Data plane nodes read configuration from etcd, while the control plane writes it through the Admin API.

Choosing traditional, decoupled or standalone mode for high availability

This table compares the three APISIX deployment modes against the failure and operations questions that drive a high availability design. Read each row as a decision point: the mode you pick determines where etcd runs, how far a control plane failure reaches, and whether routes can change through the Admin API at runtime.

OptionWhen it fitsWhat it costs operationally
Traditional (data and control plane together)Smaller estates where one gateway cluster and one etcd cluster are enough and simple operations matter more than separationAdmin API and client traffic share the same nodes on ports 9180 and 9080, so a shared fault or overload affects both, and etcd must be kept healthy alongside the gateway
Decoupled (separate data and control planes sharing one etcd cluster)Estates that need the Admin API isolated from client traffic and gateway nodes scaled without touching configuration managementTwo planes to deploy, secure and monitor, and one shared etcd cluster whose outage or misconfiguration can affect every data plane reading from it
Standalone (no etcd, file or API configuration)Environments that want no etcd dependency and accept configuration managed as a file, such as GitOps-style deliveryConfiguration is read from conf/apisix.yaml or conf/apisix.json, which APISIX checks every second for hot reload, so file distribution to every node becomes your responsibility
Shared etcd clusterDecoupled or traditional deployments that need one consistent configuration store across nodesEtcd quorum, backups and upgrades become a shared dependency; confirm the etcd sizing and authentication approach with your platform team and the APISIX documentation
Combined data and control plane blast radiusTeams that accept one failure domain in exchange for fewer moving partsA control plane fault in traditional mode can affect serving nodes directly, so test how gateway nodes behave when the Admin API or etcd is unavailable
Loss of dynamic Admin API changes in standalone modeChange processes that already run through version control and deployment pipelinesRoutes and plugins cannot be changed through the Admin API in standalone mode, so emergency changes need a file update and distribution path that every node reads
Failure domains for gateway nodesAny mode, when you place nodes across zones, racks or clusters so one domain loss does not remove all capacitySpreading nodes increases latency and cross-zone traffic costs, and etcd or file distribution must reach every zone; confirm the placement with your cloud or data center team

Building an Apache APISIX high availability cluster in the right order

This sequence takes an APISIX gateway from a deployment mode decision to a set of gateway nodes that share one configuration and remove failed upstreams automatically. Each step ends with a check, so a failure is caught before the next layer depends on it.

  1. Confirm the deployment mode and failure domains

    Choose between traditional, decoupled and standalone mode, as described in the APISIX deployment modes documentation, and map where each component will run. Decide which hosts, availability zones or data centers can fail independently, and keep etcd members, control plane nodes and gateway nodes spread across them. Standalone mode removes etcd but moves configuration distribution into your own file or API process, so that choice shapes every later step. Done when a written diagram names each host, its failure domain and the deployment mode, and your team has signed it off.

  2. Stand up the etcd cluster and confirm quorum

    In a decoupled or traditional deployment, build an etcd cluster with an odd number of members spread across failure domains, so a majority remains after a single domain is lost. Ask your APISIX version's documentation which etcd version and client settings it supports, and enable any etcd authentication your security team requires. Check member list output, leader election and health on every member, then write and read a test key from a different member. Done when the cluster reports a leader, all members are healthy, and a test write replicates to every member.

  3. Start the control plane and restrict the Admin API

    Start the control plane nodes that talk to etcd and expose the Admin API on port 9180. Confirm the Admin API key has been replaced from its default value and that network rules allow access only from your automation hosts and operator jump points. Test reachability from an allowed host and from a host outside the list, and confirm the outside host is refused. Done when an authorized request returns the expected response and an unauthorized request from any other host fails at the network layer.

  4. Start at least two gateway nodes behind a load balancer

    Bring up at least two gateway nodes, each in a different failure domain where possible, and place them behind a load balancer or virtual IP that your network team owns. Confirm each node listens for client traffic on port 9080 and that a request sent directly to each node returns a response from the expected route. Verify the load balancer health check targets a path your gateway can answer. Done when every node answers on port 9080 and the load balancer sends traffic to all of them.

  5. Load configuration and confirm all nodes agree

    Define a test route and a consumer through the Admin API in decoupled or traditional mode, or through the configuration file in standalone mode, then confirm each gateway node serves the same route. In standalone mode, check that the file is identical on every node and that a change is picked up without a restart, as described in the deployment modes documentation. Compare route lists from each node and check for differences in version or content. Done when all nodes return the same responses for the test route and no node holds a stale copy.

  6. Add upstreams with health checks

    Define upstreams for your backend services with active health checks, and where useful passive checks based on live traffic. Set the probe path, interval and failure thresholds from your service's own behavior, and confirm the exact keys for your APISIX version in the documentation before writing them. Stop one backend instance and watch the upstream status change, then confirm requests stop reaching that instance. Done when a failed backend is marked unhealthy, traffic is routed to the remaining healthy instances, and the instance returns to service after it recovers.

  7. Test failure of one component at a time

    Stop one etcd member, one gateway node and one backend in turn, and record what the clients see during each failure. Confirm that losing a single etcd member keeps the quorum and configuration changes still apply, and that losing a gateway node leaves traffic flowing through the load balancer. Repeat the test after any configuration change and after each APISIX upgrade. Done when each failure has a recorded result that matches the design from the first step, and gaps are assigned to an owner.

How health checks keep traffic off failed upstreams

A gateway is only as resilient as its response to a failing backend. The mechanisms below work at different points in a request's life, from scheduled probes that run before any user traffic arrives to per-request timeouts that bound a single slow call. Together they decide whether an APISIX node keeps sending traffic to a dead upstream, and each one needs something specific from the service behind it.

Active health checks

Active checks have APISIX probe each upstream node on a schedule, independent of client traffic. The upstream must expose a dedicated health endpoint that returns the status codes you configure as healthy, and that endpoint should reflect whether the service can actually serve requests, not just whether the process is running. Confirm the probe interval, thresholds for marking a node unhealthy and recovering it, and the check type (HTTP, HTTPS or TCP) against the APISIX documentation for your version.

Deployment modes docs

Passive health checks

Passive checks watch real responses and count errors or timeouts observed on live traffic, then take a node out of rotation when failures cross a threshold. They need no extra endpoint, but they only react after clients have already seen failures, so they complement active checks rather than replace them. Decide which HTTP status codes count as failures for your API, since treating a legitimate 404 or 429 as a fault can eject healthy nodes. Verify the thresholds and which responses are counted in your version's documentation.

Retries after failed requests

A retry sends a failed request to another upstream node, which masks transient errors from callers. It is safe only for idempotent methods such as GET, or for requests your service has made idempotent with keys, because a retried POST can create duplicate orders or payments. Limit the retry conditions to connection errors and specific status codes, and keep the retry count low so a struggling backend is not flooded. Check which failure conditions trigger retries in your APISIX version.

Timeouts on slow upstreams

Timeouts cap how long the gateway waits for connection, send and response phases. Without them, a slow upstream holds worker connections and can exhaust capacity on every gateway node, which turns one degraded service into a wider outage. Set timeouts from measured latency of each route, not a single global value, and keep them shorter than the client's own timeout so the gateway returns a clear error. Confirm the timeout keys and their defaults in the APISIX documentation for your release.

Unhealthy state versus balancer removal

Marking an upstream node unhealthy is a state change, and removing it from the load balancer is the effect that follows. Confirm how your version handles the case where every node in an upstream is unhealthy, since the gateway may still attempt traffic, and whether recovering nodes re-enter rotation gradually. Also check whether health state is held per gateway node or shared, because nodes may disagree during a partial failure. Test this with a deliberate node failure before go-live.

APISIX repository

How Apache APISIX high availability differs across virtual machines, Kubernetes and air-gapped sites

On virtual machines or bare metal, the failure domains are the hosts, the hypervisor or rack, and the network path in front of the gateway. Each APISIX node is a host you manage, so resilience comes from placing gateway nodes across separate hosts and failure zones and fronting them with a load balancer you control. etcd runs on its own hosts in a clustered layout, and the team that owns the hosts usually owns etcd as well. Confirm which team patches the etcd hosts, how backups are taken, and whether the load balancer health checks target the gateway ports rather than only a TCP socket.

  • Failure domains: Gateway nodes, etcd members and the load balancer can fail independently. Place them so that losing one rack or hypervisor host does not remove quorum or all gateway capacity.
  • etcd ownership: A dedicated platform or database team often runs etcd hosts. Agree on who handles certificate rotation, disk monitoring and member replacement.
  • Staged upgrades: Drain one gateway node at a time behind the load balancer, upgrade it, verify the health check, then move on. Keep the previous package available for rollback.
  • Load balancer behavior: Confirm the load balancer's health check, connection draining and session handling, since these determine how quickly traffic leaves a failed node.
  • Deployment mode: Confirm whether the design uses traditional or decoupled mode, and whether the Admin API on port 9180 is reachable only from management networks.

Before approval, confirm host placement, etcd member count and backup schedule with the infrastructure owners in your environment.

What drives the effort and cost of an Apache APISIX high availability build

This table lists the factors that change how much work an APISIX high availability build takes, why each one matters, and how to keep it contained. Read it as a checklist to bring into a scoping conversation, since the drivers interact and the written scope sets the final effort and timeline.

DriverWhy it changes the workHow to keep it down
Number of gateway nodes and zonesEach node needs the same plugins, certificates and configuration. More nodes and more failure zones add load balancer health checks, placement rules and failover tests.Start with the number of zones your availability target requires. Standardize node images so every node is built the same way.
etcd cluster operations and backupIn traditional and decoupled modes, etcd holds all routes and plugin configuration. Quorum sizing, member replacement, compaction and tested restores add operational work.Confirm the etcd topology your platform team already runs. Automate snapshots and rehearse a restore before go-live.
Standalone or etcd-backed mode choiceStandalone mode removes etcd but moves configuration distribution into your file or API pipeline. Each mode needs a different rollout and recovery design.Decide the mode before build starts. Confirm which mode fits your change process and whether configuration is managed in version control.
Number and type of upstreams needing health checksActive and passive health checks must be set per upstream. Services with different protocols, timeouts or failure behavior each need their own tuning and test cases.Group upstreams by behavior into a few templates. Test each template once instead of tuning every service separately.
Number of environments (dev, staging, production)Each environment needs its own etcd or standalone configuration, certificates and test traffic. Parity between environments drives how much is verified before production.Keep environment differences in variables, not separate configurations. Agree which failover tests run in staging and which need production windows.
Integration with load balancers and monitoringThe gateway sits behind your load balancer and reports to your metrics and logging stack. Health endpoints, metric export and alert routing must match what your teams already operate.Reuse existing load balancer and monitoring standards. Confirm the metrics and health endpoints your team needs before writing alert rules.
Compliance evidence requirementsAssessors may ask for failover test records, backup restore evidence, change logs and access records for the Admin API. Producing this evidence is extra work on top of the build.Agree the evidence list at scoping. Design tests and logging to produce it as a by-product of the build.
Custom plugins that must run on every nodeA custom plugin must be installed, versioned and loaded consistently on all nodes, and re-tested on each APISIX upgrade. Plugin runners add further dependencies.Limit custom code to what built-in plugins cannot cover. Package plugins with the node image so every node loads the same version.

How to test Apache APISIX high availability failover before go-live

A high availability design is only proven when failures have been injected and the results recorded. Before go-live, run five tests against the staging cluster that mirrors production, and treat each one as a pass or fail with a written expected result. The first test stops one gateway node while a steady load runs through the load balancer in front of the nodes. Success means client traffic continues with error rates inside the agreed threshold and the load balancer drops the stopped node. Safe failure means a short, bounded burst of errors during connection draining, followed by full recovery once the node returns. Record the load profile, the error count per second and the time to recovery, because a reviewer will ask for these numbers rather than a general statement that failover works.

The second and third tests target the upstreams and the configuration store. Stop one instance of a test upstream and confirm that the active health checks configured on the upstream mark it unhealthy and stop routing to it, then restart it and confirm it re-enters rotation. For etcd, sever connectivity from a single data plane node in decoupled mode, using a network rule or a firewall block on that node only. Confirm which behavior the node shows: it should keep serving with its last known configuration, log connection errors, and reject configuration changes it cannot read. Restore connectivity and confirm the node resynchronizes without a restart. Confirm the exact behavior against the APISIX deployment modes documentation for your version, since the recovery path depends on how the node reconnects.

The fourth and fifth tests check convergence. Change a route through the Admin API while one gateway node is down, bring the node back, and confirm every node serves the new route with the same plugin configuration. For file-driven standalone mode, edit conf/apisix.yaml on each node and confirm the change is applied everywhere within the one-second check interval described in the documentation. Keep the evidence for the reviewer: the test plan with expected results, load tool output, error logs, the health check status history, the configuration diff used for each change, and a signed record of who ran each test and when. Retain these alongside the rollback steps, so the same checks can be repeated after every upgrade.

Questions buyers ask about Apache APISIX high availability consultants and effort

How much does an Apache APISIX high availability build cost?

The cost depends on the scope agreed in writing, and DeployOpen does not publish a price list, so a quote follows from that scope. The main components are the design work (deployment mode, etcd topology, load balancer and failover paths), the build and configuration in your environments, testing of failover behavior, and handover documentation. Most of the cost is labor, paid for the hours of architects and engineers, plus any infrastructure you buy for the nodes and etcd members. Ask the quote to list each component separately, state which environments are covered (for example, staging and production), and name what is excluded, such as load balancer changes made by your network team. Ask for one-time and recurring items to be split.

How long does an APISIX high availability build take?

Duration is set mainly by the number of environments, the chosen deployment mode, how many upstream services need health checks, and how quickly your team can provide access and approvals. A design that uses decoupled mode with a multi-node etcd cluster takes longer to verify than a single file-driven standalone gateway, because each failure case needs a test. Ask for a timeline in the written scope with milestones such as design sign-off, staging build, failover test and production cutover, and ask which of your dependencies sit on the critical path, including change windows and firewall requests.

Can our own team build a highly available APISIX setup without outside help?

Yes, many teams do, provided they have engineers who understand NGINX-based proxies, etcd operations, TLS, load balancing and container or VM automation. APISIX documents three deployment modes: traditional, decoupled and standalone, and each has different failure behavior that must be understood before choosing. Your team will need to test node loss, etcd member loss, network partitions and upstream failures, and to write runbooks for each. If those skills are thin in-house, an outside team can shorten the learning curve, but the decision should rest on your staffing and risk tolerance rather than on the tooling alone.

What do we need to provide before the work starts?

The work needs a clear set of inputs from your side. Expect to provide:

  • Access to the target cloud accounts, virtual machines, Kubernetes clusters or data center hosts, with the least privilege needed for installation
  • Network rules between gateway nodes, etcd members, the Admin API port (9180 in traditional mode) and client traffic port (9080), plus upstream services
  • Details of your existing load balancer, including health check settings, TLS termination points and how it routes to gateway nodes
  • Identity provider, certificate authority and logging destinations if they are part of the design
  • A named owner for approvals and change windows

Ask the written scope to list each input and the date it is needed.

Do we have to run a separate etcd cluster for APISIX high availability?

It depends on the deployment mode you choose. Traditional and decoupled modes use etcd as the shared configuration store, so an etcd cluster with an odd number of members must be planned, sized and monitored. Standalone mode does not use etcd: the configuration lives in a YAML or JSON file, or is pushed through the Admin API, and APISIX reloads the file when it changes. Standalone removes an operational dependency but changes how configuration is distributed and audited, so it needs its own controls. Confirm the mode and the etcd topology in the design phase, and ask whether etcd is hosted in your environment, managed by your platform team, or delivered as part of the build.

What happens after go-live, and who maintains the cluster?

After go-live, you own the running system unless a support agreement says otherwise. Ongoing work includes monitoring gateway and etcd health, applying APISIX and etcd patch releases after testing, rotating certificates and keys, reviewing health check thresholds as upstreams change, and rehearsing failover. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, which should be scoped in writing. Ask the proposal to state what the handover includes, who responds to incidents, how upgrades are tested before they reach production, and whether a failover test is repeated after each significant change.

What to monitor, back up and document after Apache APISIX high availability go-live

The operating team needs to watch four things continuously: gateway node health, etcd cluster health and quorum, upstream health check results, and who can reach the Admin API. Gateway nodes should be monitored individually, not only behind the load balancer, so a node that stops serving or drifts from the configuration it should hold is visible before traffic is affected. For etcd, track member health, leader changes and whether the cluster still has quorum, since a cluster that loses quorum stops accepting configuration changes. Upstream health check results show whether APISIX is removing unhealthy backends as designed. Admin API access on port 9180 should be logged and alerted on, because it is the control surface for every route and plugin. Confirm with your platform team which metrics your APISIX version exposes and how they are scraped before you build dashboards.

Backups must cover both the etcd data and, in standalone mode, the configuration files themselves. In decoupled or traditional mode, a snapshot of the etcd cluster is the primary record of routes, consumers and plugin settings, so schedule snapshots and store them outside the cluster's failure domain. In standalone mode there is no etcd, and the file that APISIX watches (conf/apisix.yaml or conf/apisix.json) is the source of truth, so keep it in version control and treat each change as a reviewed release. A backup that has never been restored is not a control. Run a restore into a separate environment on a fixed schedule, measure how long it takes and confirm that the gateway serves the expected routes afterwards.

Documentation and rehearsals turn the design into something the team can operate under pressure. Record the topology, the mapping of gateway nodes, etcd members and load balancers to physical or cloud failure domains, and the ports and trust boundaries between them. Write runbooks for losing a gateway node, losing an etcd member, losing quorum and restoring from backup, each with the commands and the person who approves them. Stage upgrades across nodes one at a time and check the release line on the Apache APISIX downloads page before choosing a target version. Run failover tests on a schedule and file the results with the runbooks. Ask your implementation partner or vendor to confirm which upgrade and support terms apply to your chosen release.

How DeployOpen scopes, builds and hands over Apache APISIX high availability

DeployOpen approaches Apache APISIX high availability as a fixed-scope implementation inside your own infrastructure. The work starts with a written scope that fixes the deployment mode, the etcd topology and the failure cases to test, then builds and verifies the gateway nodes, and ends with documentation and a handover your platform team can run.

How we scope

  • Confirm which deployment mode fits your environment: traditional, decoupled or standalone, and why.
  • Map failure domains, including etcd quorum, gateway node placement and the upstream services each route depends on.
  • Record the agreed scope, deliverables and timeline in writing before any build work begins.

How we build

  • Deploy the chosen topology in your cloud accounts, data centers or air-gapped network, with the Admin API on port 9180 restricted.
  • Configure health-checked upstreams, retry behavior and horizontal scaling of gateway nodes against the agreed failure cases.
  • Test failover by stopping nodes and etcd members, and record observed behavior against the expected results.

How we hand over

  • Deliver runbooks for node replacement, etcd member recovery, configuration rollback and scaling the gateway tier.
  • Document the configuration as code, including the files or Admin API calls that define routes and upstreams.
  • Walk your operations and security teams through the topology, the test results and the open risks before closing the engagement.

How we support

  • Continue support as a retainer for upgrades, repeated failover testing and changes to upstream health checks.
  • Retest after each APISIX release you adopt, so high availability behavior is confirmed on the version you run.
  • Keep evidence of tests and configuration current so your compliance and audit teams can review the setup.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.