Comparison and Performance Evaluation of Open-Source API Gateways (NGINX, Kong, APISIX, Tyk, Zuul, Gravitee)

This article analyzes the architectures, core features, Docker‑Compose deployments, and k6 performance results of six open‑source API gateways—NGINX, Kong, APISIX, Tyk, Zuul and Gravitee—providing practical guidance for selecting a suitable gateway in microservice environments.

Java Captain
Java Captain
Java Captain
Comparison and Performance Evaluation of Open-Source API Gateways (NGINX, Kong, APISIX, Tyk, Zuul, Gravitee)

In microservice architectures, an API gateway is a common pattern to address issues such as fine‑grained service APIs, client‑specific data, network performance differences, dynamic service instances, protocol translation, and security.

The article compares six open‑source gateways—NGINX, Kong, APISIX, Tyk, Zuul and Gravitee—by describing their architecture, core features and deployment using Docker Compose, and by measuring request throughput with k6 under identical resource limits.

Common gateway functions are listed (reverse proxy, load balancing, authentication, rate limiting, request/response transformation, versioning, circuit breaking, multi‑protocol support, caching, API documentation).

For each product the article provides a brief overview, key components, configuration examples and performance results:

NGINX: configuration snippet

server {    listen 80 default_server;    location /goapi {        rewrite ^/goapi(.*) $1 break;        proxy_pass http://goapi:8080;    }    ... }

and ~1100 rps.

Kong: admin API curl commands, PostgreSQL backend, ~705 rps.

APISIX: Docker‑Compose file

version: "3.7"
services:
  apisix-dashboard:
    image: apache/apisix-dashboard:2.4
    ...
  apisix:
    image: apache/apisix:2.3-alpine
    ...
  etcd:
    image: bitnami/etcd:3.4.9
    ...

and ~1155 rps.

Tyk: Docker‑Compose

version: '3.7'
services:
  tyk-gateway:
    image: tykio/tyk-gateway:v3.1.1
    ...
  tyk-redis:
    image: redis:5.0-alpine
    ...

and 400‑600 rps.

Zuul: Java filter example

class DeviceDelayFilter extends ZuulFilter {
    static Random rand = new Random();
    @Override String filterType() { return 'pre'; }
    @Override int filterOrder() { return 5; }
    @Override boolean shouldFilter() { return RequestContext.getRequest().getParameter("deviceType").equals("BrokenDevice"); }
    @Override Object run() { sleep(rand.nextInt(20000)); }
}

and ~200 rps (improved to 600‑800 rps with more resources).

Gravitee: Docker‑Compose stack (MongoDB, Elasticsearch, gateway, management API/UI) and ~200 rps (up to 500‑700 rps with 4 CPU/2 GB).

The final section summarises the strengths and trade‑offs of each gateway and offers guidance for selecting a solution based on simplicity, extensibility, cloud‑native design and performance requirements.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Performance Testingapi-gatewayDocker Compose
Java Captain
Written by

Java Captain

Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.