Apache APISIX

DeployOpen designs, builds and hardens Apache APISIX as your API gateway: route and plugin standards, custom Lua plugins, OpenID Connect, Kubernetes ingress, etcd availability and migration from Kong or another gateway.

On this page

What an Apache APISIX API gateway implementation involves

An Apache APISIX implementation turns an inventory of your APIs into gateway routes, authentication, limits and plugins that your teams change through review. DeployOpen designs the object model, builds custom plugins, deploys and hardens APISIX and etcd in your infrastructure, and hands over runbooks and named owners.

Apache APISIX is described in its official repository as a high-performance API gateway, and the repository is licensed under the Apache License 2.0. It is built on NGINX and ngx_lua and uses LuaJIT for request-time logic. The architecture documentation says the core handles route matching, load balancing, service discovery and configuration updates, and that Lua plugins run inside the APISIX worker process. In traditional and decoupled modes, etcd is the configuration store.

A gateway sits in front of many teams' services, so the work is mostly agreement and design. It covers an inventory of APIs and their consumers, an authentication model per API, traffic and rate policies, logging and tracing standards, and a way to change configuration through review. Custom plugins come in where your rules do not fit the built-in set, for example a token format from a legacy system or a header contract shared with partners.

Two surrounding components shape the design. The embedded APISIX dashboard is enabled by default and is served at /ui/ on the Admin API port, as the dashboard documentation describes. The APISIX Ingress Controller translates Kubernetes Ingress v1, Gateway API and APISIX custom resources into APISIX configuration. Each is covered below with the choices it forces.

Choose an APISIX deployment mode: traditional, decoupled, standalone or Kubernetes

In traditional mode one instance runs both the data plane and the control plane. The role is traditional and config_provider is etcd. Port 9080 (node_listen) carries traffic and port 9180 (admin_listen) serves the Admin API, as the deployment modes documentation describes. This is the simplest layout, and it puts the Admin API on every gateway node. Restrict the Admin API to administrative networks, or disable it on nodes that face clients. Keep etcd as the single configuration store that every node watches, and plan its availability from the start.

Map each API to APISIX routes, services, upstreams and consumers

Discovery produces an inventory of APIs. Design turns each one into a small set of APISIX objects with naming and ownership rules. The secret reference formats below come from the APISIX secret documentation.

ObjectWhat it holdsDesign decisions
RouteMatch rules for host, path, method and headers, plus the plugins applied to matching requests.Naming, path ownership per team, and how route conflicts are prevented.
ServicePlugins and an upstream shared by several routes.Group routes by backend so a policy change happens in one place.
UpstreamBackend nodes, load balancing, health checks, retries and timeouts.Static nodes or service discovery, and active or passive health checks.
ConsumerAn API client with its credentials and per-consumer plugins.One consumer per application or partner, and consumer groups for shared limits.
Global rules and plugin configsPlugins that run on every request, and reusable plugin sets.Which controls are mandatory everywhere, such as logging, tracing and IP restrictions.
SSL and secretsCertificates for SNI, and references to secrets held in environment variables, HashiCorp Vault (KV engine V1), AWS Secrets Manager or GCP Secrets Manager. References look like $ENV://name or $secret://manager/id/secret_name/key.Certificate renewal, and which secret store holds plugin credentials.

Built-in plugins for authentication, rate limiting and observability

APISIX ships many plugins. A typical design standardizes a small set and documents when each is used.

Authentication

key-auth suits application clients. For tokens from an OIDC provider such as Keycloak, openid-connect requires client_id, client_secret and discovery. It supports Authorization Code, Client Credentials, Introspection, Password, Refresh Token and PKCE flows, and bearer_only mode offers token-only validation. We choose one authentication model per API and document it in the plugin standards.

Traffic control

limit-count sets quotas per route or consumer. Its default policy is local, where each instance keeps its own counter, so a client can use the full limit on every node. The redis, redis-cluster and redis-sentinel policies share one quota across nodes. limit-req and limit-conn cover request rate and concurrency. Pick the policy per API and record why.

Request and response changes

proxy-rewrite and response-rewrite change paths, hosts and headers. They keep backend contracts stable while public paths change, which matters during a migration. When the built-in set does not fit, a custom plugin can change responses in the header_filter or body_filter phase. Document which rewrites each team may add.

Observability

The prometheus plugin exposes metrics, and its sample configuration serves them on port 9091 at /apisix/prometheus/metrics, bound to 127.0.0.1, so plan how your scraper reaches it. opentelemetry sends traces, and http-logger or kafka-logger send access logs to your log pipeline or SIEM. Release 3.21.0 also stopped logging sensitive configuration values and extended data-mask to upstream_uri in access logs.

Access restrictions

ip-restriction, cors and request size limits protect routes that should only be reachable from known networks or browsers. The same thinking applies to the Admin API, where by default only 127.0.0.0/24 may connect and deployment.admin.allow_admin sets the allowed addresses. Decide which restrictions are global rules and which belong to individual routes.

Building an APISIX custom plugin in Lua, external runners or Wasm

APISIX offers three extension routes for a custom plugin. We pick one per plugin based on latency, team skills and how close the logic must sit to the request. The plugin development guide sets the rules for Lua plugins.

Lua plugins

  • Run inside the APISIX worker process with the lowest overhead.
  • extra_lua_path must point to a directory that contains /apisix/plugins, and each plugin has a JSON Schema for its configuration.
  • Setting the plugins list replaces the default list, so name every built-in plugin you still need.
  • Phase matters: authentication plugins such as key-auth belong in the rewrite phase, response changes use header_filter or body_filter, and logging uses log(conf, ctx).
  • Priority must not match any existing plugin. The guide recommends 1 to 99 unless the plugin must run before built-ins.
  • encrypt_fields lists configuration fields to store encrypted.

Plugin runners

  • Runners exist for Java, Go, Python and JavaScript. The JavaScript runner is a community project.
  • APISIX launches the runner as a subprocess and sends requests to it by RPC over a Unix socket, which adds a hop per request.
  • Suited to logic that reuses existing libraries in those languages.
  • Measure the added latency before using a runner on a busy route.

WebAssembly

  • Plugins are built with the Proxy Wasm SDK.
  • Only a few APIs are currently implemented, so confirm that your logic is covered before you start.

Testing and release

  • Test::Nginx test cases for each plugin.
  • Load tests to measure added latency.
  • Versioned plugin packages deployed with the gateway image.
  • Plugin tests rerun against the target version before each upgrade.

Migrating to APISIX from Kong or another gateway

Migrations from Kong, NGINX configurations, cloud API gateways or older in-house proxies start with an export of every route, its authentication, its limits and its transformations. Each item is mapped to an APISIX route, service, consumer or plugin. Anything without a direct equivalent becomes a custom plugin or a design change agreed with the API owner.

Consumer credentials need special care. API keys and client certificates can often be imported, while token formats and signing keys depend on the identity provider behind them. Plan how partners are told about any change before cutover.

Run APISIX beside the old gateway, replay recorded or synthetic traffic against both and compare status codes, headers and latency. Move traffic per domain or path with DNS or load balancer weights, and keep the old gateway ready for rollback until logs and error rates are stable.

Teams weighing APISIX against Kong get the most useful answer from their own export. Count the routes, authentication models, limits and transformations that map directly, and the ones that need a custom plugin. That count, together with your deployment mode and Kubernetes use, shows the effort of an APISIX migration from Kong better than a feature list.

APISIX etcd high availability, Admin API key and hardening

The APISIX FAQ says the control plane relies only on an etcd cluster and the data plane is stateless, so a load balancer can sit in front of multiple nodes. For etcd high availability, run at least two gateway nodes behind a load balancer and an etcd cluster of three or five members across failure domains, with TLS and authentication on etcd. Test what your release does when etcd is unreachable, including a node restart during the outage, and record the result.

The Admin API is served under /apisix/admin on port 9180 and authenticates with the X-API-KEY header, per the Admin API documentation. If no Admin API key is set, APISIX generates a random one, and the FAQ says to update it for production. Replace it with a key from your secrets manager, restrict addresses with deployment.admin.allow_admin, and keep the Admin API off data plane nodes.

The embedded dashboard is enabled by default and served at /ui/ on the Admin API port. Turn it off where it is not needed with enable_admin_ui under deployment.admin, and restart APISIX, because the dashboard documentation says a change needs a restart. Treat dashboard access as Admin API access.

Terminate TLS with certificates from your CA, keep plugin credentials in a secret store, and send access logs to your SIEM. For staff and partner APIs, the openid-connect plugin validates tokens from your identity provider. In that plugin, session.secret must be at least 16 characters, session.storage is cookie by default or redis, and client_secret is encrypted in etcd. API access then follows the same sign-in and MFA policies as your other systems.

Installing APISIX with Docker Compose, Helm or packages, and upgrading to 3.21.0

The installation guide lists Docker Compose, Helm, RPM, DEB and source installs. The Helm chart's bundled etcd is for development and testing only. RPM packages moved from UBI 8 to UBI 9 starting with APISIX 3.14.0. APISIX needs etcd v3.4.0 or later with the etcd gRPC gateway enabled, and the install dependencies page lists Debian 11 and 12 and Ubuntu 20.04, 22.04, 24.04 and 26.04 as supported operating systems.

For production, the guide says to use a supported, version-pinned external etcd with authentication, TLS, persistent storage, backup and recovery, and network isolation. It also says to run apisix test after any configuration change, then reload or restart, and to verify the running version with apisix version after installing or upgrading. Put both steps in your deployment pipeline.

The downloads page lists 3.21.0, dated 2026-11-19, as the current release. Its release notes upgrade APISIX Runtime to 1.4.3, which includes ten upstream NGINX security fixes. Whether they apply depends on the enabled modules and configuration. Earlier releases are listed on the GitHub releases page.

Check these items from the notes before upgrading from 3.20.0. When admin_key_required is enabled, every Admin API key needs an explicit admin or viewer role, and numeric-looking keys should be quoted in YAML. Newly encrypted values carry a $ENC$v1$ prefix. Back up etcd first and avoid Admin API writes during a rolling upgrade. The new NGINX core rejects malformed header lines, so test clients that send unusual headers. Source installs must install APISIX Runtime 1.4.3 separately and then run make deps APISIX_RUNTIME=1.4.3. Handover includes the upgrade runbook.

Operating APISIX after go-live: common questions

How should configuration changes be made in production?

Keep routes, consumers and plugin settings declarative in Git, as standalone files, Kubernetes resources or definitions synced to the Admin API by a pipeline. Review each change. Run apisix test after any configuration change, then reload or restart. Avoid edits through the dashboard in production except in an emergency, and follow any emergency edit with a commit so Git stays the source of truth.

How do we install APISIX with Docker Compose or the Helm chart?

The installation guide lists Docker Compose, Helm, RPM, DEB and source installs. Docker Compose and Helm both work for APISIX, but the Helm chart's bundled etcd is for development and testing only. For production, point APISIX at a supported, version-pinned external etcd with authentication, TLS, persistent storage, backup and recovery, and network isolation. After installing, verify the running version with apisix version.

How does APISIX rate limiting with limit-count work across several nodes?

The limit-count plugin defaults to the local policy, where each instance keeps its own counter. With several gateway nodes behind a load balancer, a client can use the full limit on each node. The redis, redis-cluster and redis-sentinel policies share one quota across nodes. Design picks the policy per route or consumer, and Redis then becomes a dependency to size and monitor.

How do we connect APISIX to Keycloak with OpenID Connect?

Use the openid-connect plugin, which requires client_id, client_secret and discovery. It supports Authorization Code, Client Credentials, Introspection, Password, Refresh Token and PKCE flows, and bearer_only mode offers token-only validation for API clients. Point discovery at your Keycloak or other OIDC provider. DeployOpen integrates your identity provider as part of the build. The plugin encrypts client_secret in etcd, and a secret store reference keeps it out of plain files.

What do we back up, and how do upgrades work?

Take scheduled etcd snapshots in traditional and decoupled modes, and keep declarative configuration, custom plugins and gateway configuration files in version control. Rehearse rebuilding a gateway from Git and a snapshot. For upgrades, read the changelog for each release between your version and the target, test custom plugins, and replace nodes one at a time behind the load balancer. The 3.21.0 notes add a step: back up etcd first and avoid Admin API writes during a rolling upgrade.

Who owns what?

A platform team runs the gateway, etcd and certificates. API owners request routes and policies through change control. Security owns authentication standards, global rules and log review. Handover includes named owners for each of these areas, so every kind of change request has a clear destination and a clear approver before the first incident tests it.

Can APISIX help with compliance evidence?

Gateway logs, authentication policies and rate limits support evidence for access control and monitoring requirements under SOC 2, ISO 27001, DORA or NIS2. DeployOpen can assess the setup against those controls. We do not issue audit reports or certifications. Your auditor decides which evidence is sufficient, so agree the log retention and review steps with them early.

Scope, effort and handover for an APISIX project

Effort depends on the number of APIs and consumers, authentication models, custom plugins, whether a gateway migration is in scope, the deployment mode, Kubernetes use and availability targets.

Agreeing standards across API owning teams usually takes longer than installing the gateway. Settle naming, path ownership, the authentication model per API and the mandatory global rules early, because every later route depends on them.

DeployOpen inventories your APIs, designs the object model and plugin standards, builds and tests custom plugins, deploys and hardens APISIX and etcd in your infrastructure, integrates your identity provider, runs migrations from your current gateway and trains platform and API teams.

Handover includes the configuration repository, plugin source and tests, deployment and upgrade runbooks, an etcd restore test record, dashboards and alerts, and named owners for each area.

Sources and further reading

More on Apache APISIX

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.