Kokil Thapa - Professional Web Developer in Nepal
Freelancer Web Developer in Nepal with 15+ Years of Experience

Kokil Thapa is an experienced full-stack web developer focused on building fast, secure, and scalable web applications. He helps businesses and individuals create SEO-friendly, user-focused digital platforms designed for long-term growth.

Apache APISIX Overview

By Kokil Thapa | Last reviewed: September 2026

Your Laravel API works fine behind Apache or Nginx until traffic spikes, partner integrations multiply, and every team wants its own rate limits and auth rules. An Apache APISIX Overview helps you decide whether this open-source gateway belongs in front of your services. APISIX sits on OpenResty (Nginx plus LuaJIT) and stores routes in etcd, so you change routing without reloading the whole edge. If you already ship REST API development in Nepal or maintain multi-service stacks, this guide covers what APISIX actually does in production.

What is Apache APISIX and how does its architecture work?

Apache APISIX is a cloud-native API gateway donated to the Apache Software Foundation. It terminates HTTP, HTTPS, gRPC, TCP, and WebSocket traffic at the edge. Configuration lives in etcd, a distributed key-value store. Data plane nodes read etcd and apply changes in near real time.

That split matters on real deployments. Traditional Nginx configs need a reload for every route tweak. APISIX pushes updates through its Admin API or declarative YAML. I've seen this pattern on production Laravel applications where mobile apps, partner webhooks, and admin dashboards all hit the same hostname with different auth and throttle rules.

Apache APISIX ArchitectureClientsAPISIX Data PlaneOpenResty + Lua pluginsLaravel APIPHP 8.5Node ServiceREST / gRPCLegacy PHPWordPress 7.1etcd ClusterRoutes, plugins, certs
Apache APISIX overview: clients hit the gateway; etcd feeds live config to upstream Laravel, Node, and legacy services.

Control plane versus data plane

The data plane handles every request. It runs the Nginx worker model with Lua hooks for plugins. The control plane is etcd plus the Admin API (or APISIX Ingress Controller on Kubernetes). You rarely SSH into gateway boxes to edit files. You POST JSON to the admin port or sync Git-backed YAML through CI.

APISIX also ships apisix-dashboard for visual route management. For teams without a dedicated platform group, the dashboard lowers the barrier. For GitOps shops, declarative config in version control is usually safer. Both paths write to the same etcd keys.

Why etcd instead of flat files?

etcd gives you watch-based propagation. When a route changes, all gateway nodes pick it up within seconds. That fits API rate limiting and abuse prevention workflows where you tighten limits during an attack without a full deploy window.

The trade-off is operational overhead. You need a healthy etcd cluster (typically three nodes for quorum). On a single VPS hosting one Laravel app, plain Nginx may still be the right call. APISIX earns its keep when you manage dozens of routes across multiple upstreams and environments.

How does Apache APISIX compare to Kong, Nginx, and Traefik?

Engineers often evaluate APISIX against Kong, raw Nginx, and Traefik. All four terminate traffic at the edge. The differences sit in config model, plugin ecosystem, licensing, and day-two operations.

CriteriaApache APISIXKong GatewayNginx (reverse proxy)Traefik
Config storeetcd (dynamic)PostgreSQL or DB-lessFlat filesFile, K8s CRD, or KV
Hot reloadYes, no worker restartYes (DB mode)Reload requiredAutomatic discovery
Plugin model80+ Lua pluginsLarge Kong plugin hubLua or C modulesMiddleware chain
LicenseApache 2.0Apache 2.0 (OSS tier)BSD-style (open core)MIT
Best fitHigh-change API fleetsEnterprise Kong shopsSimple PHP/Laravel sitesKubernetes-native stacks

For a brochure WordPress site on shared hosting, Nginx versus Apache for PHP sites is the more relevant debate. APISIX targets API-first architectures: mobile backends, partner B2B APIs, and microservices behind one public hostname.

Kong and APISIX feel similar because both use OpenResty under the hood. APISIX tends to ship more built-in plugins without a separate enterprise tier for basics like JWT auth and request rewriting. Kong's commercial support and Konnect cloud control plane appeal to larger orgs. APISIX fits teams that want Apache governance and full dynamic config without a vendor subscription.

APISIX Plugin PipelineRequestHTTP / gRPCRewriteURI / headersAuthJWT / key-authRate limitRedis / localProxyUpstreamPlugins run in phase order — configure per route or globallyReject bad requests before they hit Laravel or Node upstreams
Apache APISIX overview of the request path: rewrite, authenticate, throttle, then proxy to upstream services.

How do you install and configure Apache APISIX on Ubuntu?

The official install path for Linux uses OS packages or Docker Compose. On Ubuntu 22.04 or 24.04 servers — the same boxes I use for Linux system administration — Docker Compose is the fastest way to stand up APISIX plus etcd for a proof of concept.

Docker Compose quick start

Create a project directory and add a compose file. The example below pins a recent APISIX release and bundles etcd:

mkdir apisix-poc && cd apisix-poc

cat > docker-compose.yml <<'EOF'
services:
  etcd:
    image: bitnami/etcd:3.5
    environment:
      ALLOW_NONE_AUTHENTICATION: "yes"
      ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379
    ports:
      - "2379:2379"

  apisix:
    image: apache/apisix:3.11.0-debian
    depends_on:
      - etcd
    ports:
      - "9080:9080"
      - "9180:9180"
      - "9443:9443"
    volumes:
      - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
EOF

Point APISIX at etcd in config.yaml:

deployment:
  role: traditional
  role_traditional:
    config_provider: etcd

etcd:
  host:
    - "http://etcd:2379"
  prefix: "/apisix"
  timeout: 30

plugin_attr:
  prometheus:
    export_uri: /apisix/prometheus/metrics
    export_addr:
      ip: "0.0.0.0"
      port: 9091

Start the stack and verify the admin API responds:

docker compose up -d
curl -i http://127.0.0.1:9180/apisix/admin/routes \
  -H "X-API-KEY: edd1c9f034335f136f66ad894625facd"

Change the default admin key immediately. The shipped demo key is public knowledge. Store a strong key in your secrets manager. You can generate one with the password generator tool on this site, then rotate it in config.yaml under deployment.admin.admin_key.

Register your first upstream route

Suppose a Laravel 13 API listens on port 8000 on a private network. Register an upstream and route through the Admin API:

curl "http://127.0.0.1:9180/apisix/admin/upstreams/1" -X PUT \
  -H "X-API-KEY: YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "roundrobin",
    "nodes": {
      "10.0.1.50:8000": 1
    }
  }'

curl "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT \
  -H "X-API-KEY: YOUR_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "/api/*",
    "upstream_id": 1,
    "plugins": {
      "limit-count": {
        "count": 100,
        "time_window": 60,
        "rejected_code": 429,
        "key": "remote_addr"
      },
      "prometheus": {}
    }
  }'

Traffic to http://gateway-host:9080/api/v1/users now proxies to Laravel with a 100-requests-per-minute cap per IP. Your application still validates business rules. The gateway handles edge throttling before PHP-FPM workers get saturated.

  1. Provision etcd with odd-numbered nodes for production quorum.
  2. Install APISIX data plane nodes behind a load balancer.
  3. Lock down port 9180 to admin IPs or a VPN only.
  4. Define upstreams for each backend service.
  5. Attach route-level plugins for auth, CORS, and logging.
  6. Export Prometheus metrics and wire alerts into your stack.

For JSON payload testing during route setup, paste Admin API responses into the JSON formatter to catch typos before they hit etcd.

Which Apache APISIX plugins matter most in production?

APISIX ships 80+ plugins covering security, traffic control, observability, and serverless hooks. You enable plugins per route, per service, or globally. Below are the ones I reach for first on client API projects.

Security and identity

  • key-auth — simple API keys for partner integrations and internal tools.
  • jwt-auth — validate Bearer tokens before requests reach Laravel Sanctum or Passport.
  • openid-connect — delegate login to Keycloak, Auth0, or similar IdPs.
  • ip-restriction — allowlist office IPs for admin-only routes.
  • cors — centralise cross-origin rules instead of duplicating them in every service.

Traffic management

The limit-count and limit-req plugins protect upstreams from bursts. Pair them with Redis 8.10 for cluster-wide counters when you run multiple gateway nodes. The proxy-cache plugin caches GET responses at the edge — useful for read-heavy catalog endpoints on eCommerce APIs similar to stacks behind Quick And Easy Nepalese Grocery.

traffic-split supports canary releases. Send 5% of traffic to a new Laravel release while 95% stays on stable. That beats blue-green DNS flips for API clients that cache hostnames aggressively.

Observability

Built-in prometheus, zipkin, and opentelemetry plugins export latency and status codes. Wire Prometheus into Alertmanager using patterns from alerting with Prometheus Alertmanager. You get per-route error rates without instrumenting every controller.

The http-logger and kafka-logger plugins push access logs to external systems. If you already run event pipelines, see Apache Kafka fundamentals for how log sinks feed analytics downstream.

APISIX Deployment ModelsBare Metal / VPSUbuntu + packagesSingle team APIsDocker ComposePOC and stagingFast iterationKubernetesIngress ControllerMulti-tenant scaleShared etcd + Admin APISame config model across all three pathsPick based on ops maturity, not hype
Apache APISIX overview of deployment choices: VPS packages, Docker for staging, Kubernetes Ingress for scale.

Not every project needs a dedicated gateway. A law-firm brochure site on WordPress 7.1 with a contact form rarely justifies etcd. A client portal with document uploads, payment callbacks, and mobile API access is a different story.

On legal-tech portals I've shipped — platforms with booking, document sharing, and third-party payment webhooks — the edge layer carries real load. Khalti, eSewa, and Stripe callbacks need stable public URLs. APISIX can terminate TLS, enforce IP allowlists on webhook paths, and log every callback attempt before Laravel processes it.

Consider APISIX when three or more of these apply:

  • Multiple backend services share one public domain.
  • Partner APIs need per-client rate limits and API keys.
  • You run canary or A/B traffic splits between app versions.
  • Centralised observability across services is missing today.
  • Config changes happen weekly and Nginx reloads feel risky.
  • You plan Kubernetes migration within the next year.

Skip APISIX when a single Laravel 13 monolith serves everything and your team has no etcd experience. A well-tuned Nginx reverse proxy with limit_req zones covers many Nepal SMB workloads at lower ops cost. Read Nginx versus Apache performance and use cases for that simpler path.

For enterprise multi-service builds, APISIX pairs naturally with work described under enterprise application development. The gateway becomes the contract point for external consumers while internal teams ship services independently.

Should You Adopt APISIX?Multiple APIs or services?NoStay on NginxLower ops costYesNeed dynamic routes?Frequent config changesAdopt APISIXetcd + plugin edgeBudget for etcd ops: roughly Rs 15,000–40,000/month (~USD 110–295)for managed K8s or three small VPS nodes in Nepal hosting
Apache APISIX overview decision guide: single monoliths stay on Nginx; multi-service fleets gain from dynamic gateway config.

Integrating with Laravel Sanctum and queues

APISIX validates JWT or API keys at the edge. Laravel Sanctum still owns session and token issuance inside the app. Do not duplicate auth logic in Lua unless you have a clear reason. Let the gateway reject obviously bad tokens early. Let Laravel policies enforce resource-level permissions.

For webhook endpoints, disable CSRF as you normally would in Laravel. Add APISIX ip-restriction or mTLS plugins on those routes. Payment gateways publish IP ranges you can allowlist. That cuts junk POST traffic before it hits your queue workers.

High availability and multi-region notes

Run at least two APISIX data plane nodes behind a load balancer. etcd needs three nodes minimum for fault tolerance. Cross-region etcd is painful. Prefer one etcd cluster per region with DNS geo-routing, as outlined in active-active versus active-passive multi-cloud patterns.

After gateway deploys, run load tests through testing and optimization workflows. Watch P99 latency at the gateway and upstream. A misconfigured limit-req plugin can starve legitimate burst traffic from mobile clients.

Key Takeaways

  • Apache APISIX is a dynamic API gateway on OpenResty plus etcd — routes update without full Nginx reloads.
  • Use it when multiple services, partner APIs, or frequent config changes justify etcd operations.
  • Start with Docker Compose, lock down the admin key, and attach limit-count plus prometheus plugins on day one.
  • Keep Laravel auth and business validation in PHP; let APISIX handle edge throttling, TLS, and logging.
  • Compare against Kong for enterprise support needs and against plain Nginx for single-monolith simplicity.
  • Export metrics to Prometheus and treat gateway config as code through Git-backed Admin API calls or declarative YAML.

People Also Ask

Is Apache APISIX free to use in production?

Yes. APISIX is Apache License 2.0 open source. You pay for infrastructure (servers, etcd, Redis, load balancers) and the engineering time to operate it. There is no per-request vendor fee unlike some commercial API management platforms.

Does Apache APISIX replace Nginx entirely?

APISIX builds on OpenResty, which is Nginx plus Lua. It replaces hand-edited Nginx configs for API routing scenarios. Static asset sites and simple PHP-FPM vhosts may still run faster on a plain Nginx or Apache stack with less moving parts.

What database does Apache APISIX use?

APISIX stores configuration in etcd, not MySQL or PostgreSQL. Some plugins (like limit-count with Redis policy) use Redis 8.10 for shared counters. Application data still lives in your own MySQL 9.7 or PostgreSQL 18 databases behind the gateway.

Can Apache APISIX run on Kubernetes?

Yes. The APISIX Ingress Controller watches Kubernetes resources and syncs them to etcd. This is the standard path for teams already on K8s who want Gateway API-compatible routing without bolting on a separate proprietary control plane.

Deploy the Right Edge Layer for Your API Stack

This Apache APISIX Overview should give you enough context to decide, install, and harden a gateway in front of Laravel, Node, or mixed upstreams. Start small with one staging route, prove rate limiting and metrics export, then expand. If you want help designing the edge layer for a multi-service platform — or you're unsure whether Nginx alone is enough — contact us to walk through your traffic profile. You can also browse the Mijar Law Associates portfolio for an example of a secure client portal where edge routing and app-level auth must work together, or explore web development services for full-stack delivery from gateway to database.

Official references worth bookmarking: the Apache APISIX getting started guide, the plugin hub documentation, and the etcd documentation for cluster sizing and backup procedures. Pair those with internal guides on admission controllers and validating webhooks if you're standardising edge policy across Kubernetes and bare-metal gateways. For ongoing ops after launch, support and maintenance keeps both the gateway layer and upstream apps patched through PHP 8.5 and Laravel 13 upgrade cycles.

Read more on the blog, review customer reviews, or visit the homepage to see how production systems are built and operated from Kathmandu for clients in Nepal and abroad. When your API surface grows beyond a single controller file, APISIX gives you one place to enforce the rules — as long as you respect the etcd tax and treat gateway config with the same discipline as application code.

Frequently Asked Questions

Apache APISIX is a dynamic, plugin-driven API gateway built on OpenResty and etcd. It handles routing, authentication, rate limiting, and observability at the edge without full restarts.

Yes. APISIX is Apache License 2.0 open source. You pay for servers, etcd, Redis, load balancers, and engineering time — not per-request vendor fees.

No. APISIX runs on OpenResty (Nginx plus Lua) and replaces hand-edited Nginx configs for API routing. Simple PHP-FPM or static sites often stay on plain Nginx with less overhead.

All four terminate traffic at the edge, but config models differ. APISIX stores routes in etcd with hot reload and 80+ Lua plugins under Apache 2.0. Kong also uses OpenResty but relies on PostgreSQL or DB-less mode and offers stronger commercial support. Raw Nginx uses flat files and needs reloads — fine for simple Laravel sites. Traefik targets Kubernetes-native stacks with automatic discovery. APISIX fits high-change API fleets; Kong suits enterprise shops wanting Konnect; Nginx wins single-monolith simplicity.

etcd provides watch-based propagation. When a route changes, all gateway nodes pick it up within seconds — useful for tightening rate limits during abuse without a deploy window. Traditional Nginx configs need a reload for every tweak. The trade-off is operational overhead: you need a healthy etcd cluster, typically three nodes for quorum. On a single VPS hosting one Laravel app, plain Nginx may still be the right call. APISIX earns its keep when you manage dozens of routes across multiple upstreams and environments.

The data plane handles every request using the Nginx worker model with Lua plugin hooks. The control plane is etcd plus the Admin API, or the APISIX Ingress Controller on Kubernetes. You rarely SSH into gateway boxes to edit files — you POST JSON to the admin port or sync Git-backed YAML through CI. APISIX also ships apisix-dashboard for visual route management, which lowers the barrier for teams without a dedicated platform group. GitOps shops usually prefer declarative config in version control. Both paths write to the same etcd keys.

On Ubuntu 22.04 or 24.04, Docker Compose is the fastest path. Create a project directory with a compose file bundling bitnami/etcd:3.5 and apache/apisix:3.11.0-debian. Map ports 9080 for traffic, 9180 for the Admin API, and 9443 for TLS. Point APISIX at etcd in config.yaml under deployment.role_traditional with config_provider etcd. Run docker compose up -d, then verify with curl against port 9180. Change the default admin key immediately — the shipped demo key is public knowledge. Store a strong key in your secrets manager and rotate it in config.yaml.

Security plugins I reach for first include key-auth for partner APIs, jwt-auth and openid-connect for token validation, ip-restriction for admin routes, and cors for centralised cross-origin rules. For traffic management, limit-count and limit-req protect upstreams — pair them with Redis 8.10 for cluster-wide counters on multiple gateway nodes. proxy-cache helps read-heavy catalog endpoints; traffic-split supports canary releases. Observability comes from prometheus, zipkin, and opentelemetry plugins, plus http-logger or kafka-logger for access log sinks. Enable plugins per route, service, or globally depending on scope.

Consider APISIX when three or more signals apply: multiple backend services share one public domain, partner APIs need per-client rate limits and API keys, you run canary traffic splits, centralised observability is missing, config changes happen weekly and Nginx reloads feel risky, or you plan Kubernetes migration within a year. On legal-tech portals with document uploads, payment callbacks, and mobile API access, the edge layer carries real load. Khalti, eSewa, and Stripe callbacks need stable public URLs. Skip APISIX when a single Laravel 13 monolith serves everything and your team has no etcd experience.

APISIX stores configuration in etcd, a distributed key-value store — not MySQL or PostgreSQL. Data plane nodes read etcd and apply changes in near real time. Some plugins use external stores: limit-count with a Redis policy relies on Redis 8.10 for shared counters across gateway nodes. Your application data still lives in MySQL 9.7 or PostgreSQL 18 behind the gateway. Treat etcd as part of the gateway control plane, not a replacement for your application database.

APISIX validates JWT or API keys at the edge using plugins like jwt-auth and key-auth. Laravel Sanctum and Passport still own session and token issuance inside the app — do not duplicate auth logic in Lua unless you have a clear reason. Let the gateway reject obviously bad tokens early; let Laravel policies enforce resource-level permissions. For webhook endpoints, disable CSRF as you normally would in Laravel, then add APISIX ip-restriction or mTLS plugins on those routes. Payment gateways publish IP ranges you can allowlist, cutting junk POST traffic before it hits queue workers.

Change the default admin key immediately after standing up the stack — the demo key shipped in documentation is public knowledge. Generate a strong key, store it in your secrets manager, and rotate it in config.yaml under deployment.admin.admin_key. Lock down port 9180 to admin IPs or a VPN only — never expose it to the public internet. For JSON payload testing during route setup, validate Admin API responses before they hit etcd to catch typos early. Treat gateway config as code through Git-backed Admin API calls or declarative YAML for auditability.

Yes. The APISIX Ingress Controller watches Kubernetes resources and syncs them to etcd. This is the standard path for teams already on K8s who want Gateway API-compatible routing without bolting on a separate proprietary control plane. APISIX also fits teams planning Kubernetes migration within the next year — you can start with Docker Compose on Ubuntu for staging, then move the same route and plugin model into the Ingress Controller. The data plane still runs OpenResty workers; only the config delivery mechanism changes from Admin API calls to cluster resource watches.

Run at least two APISIX data plane nodes behind a load balancer so one node failure does not drop edge traffic. Provision etcd with odd-numbered nodes — three minimum for fault tolerance and quorum. Cross-region etcd is painful; prefer one etcd cluster per region with DNS geo-routing instead of stretching etcd across datacenters. After gateway deploys, run load tests and watch P99 latency at both the gateway and upstream. A misconfigured limit-req plugin can starve legitimate burst traffic from mobile clients, so tune limits against real traffic patterns.

Skip APISIX when a single Laravel 13 monolith serves everything and your team has no etcd experience. A well-tuned Nginx reverse proxy with limit_req zones covers many Nepal SMB workloads at lower ops cost. A law-firm brochure site on WordPress 7.1 with a contact form rarely justifies etcd overhead. APISIX targets API-first architectures: mobile backends, partner B2B APIs, and microservices behind one public hostname. If you manage one upstream on a single VPS, the operational cost of a three-node etcd cluster outweighs the benefit of dynamic route updates without reloads.

Share this article

0 Comments

Leave a comment

Your email is not published. Comments appear once they have been read. Sign in to have your details filled in.

Quick Contact Options
Choose how you want to connect me: