> ## Content Index
> Fetch the complete content index at: https://ettayeb.fr/llms.txt
> Use this file to discover other available public pages before exploring further.

# Your APIs are the front door of your business — an API Gateway protects, measures, and accelerates them
- URL: https://ettayeb.fr/en/networking/api-gateways-en/
- Published: 2026-07-23T00:00:00.000Z
- Updated: 2026-11-23T15:26:37.000Z
- Description: Your APIs aren’t internal plumbing anymore — they’re your products. An API Gateway centralizes the rate limiting, authentication, caching, and analytics that every microservice would otherwise have to reinvent in its own code.
- Author: Walid ETTAYEB
- Tags: Networking, api-gateway, kong, traefik, tyk, rate-limiting, #en, #Import 2026-11-23 14:52

As of **July 2026**, **Kong** has passed **38,000 GitHub stars**, **Traefik** sits at **64,000**, and **Tyk** continues its quiet rise at **10,000 stars** with a feature neither of the other two offers: a **fully open-source dashboard**. Three API Gateways, three architectural philosophies, one shared reality: your APIs are no longer internal plumbing — they’re the **front door of your business**. Leaving them exposed without control is like installing a safe without a door.

The problem is universal. The moment an organization runs more than **three or four microservices**, every team starts reinventing in application code what a gateway does natively: **rate limiting** to keep the backend from melting down, **authentication** to stop unauthorized access, **request transformation** to normalize formats, **caching** to avoid recomputing the same result twenty times, and **analytics** to know who is calling what. Without a gateway, these scattered functions become a maintenance nightmare — and a wider attack surface: every directly exposed microservice is an entry point that must be secured individually.

An API Gateway is the **single entry point** that centralizes these responsibilities upstream of your services. But the term covers very different technical realities. Comparing **Kong**, **Traefik**, and **Tyk** isn’t about ranking three equivalent competitors — it’s about choosing among three architectural models that solve different problems.

## What an API Gateway does — and what it doesn’t

A gateway acts as an **intelligent reverse proxy** sitting between your clients and backend services. It intercepts every request, applies a set of policies, then routes the traffic — or blocks it. The six core functions are:

- **Rate limiting and quotas**: cap the number of calls per second, minute, or API key. Without a gateway, this logic lives in each service’s code — and every team implements it differently, with inconsistent thresholds.
- **Authentication and authorization**: **JWT**, **OAuth2**, **OpenID Connect**, **mTLS**, **API keys**. The gateway verifies credentials at a single point and forwards the identity to the backend — rather than duplicating token validation across **ten microservices**.
- **Request and response transformation**: add or strip headers, convert XML to JSON, redact sensitive fields before replying to the client. Without a gateway, these transformations pile up as application middleware.
- **Caching**: store frequent responses to reduce backend load. A gateway cache can absorb **60 to 80%** of traffic on low-volatility reference endpoints.
- **Routing and load balancing**: direct `/users` to the user service and `/orders` to the orders service, with traffic distribution. The gateway doubles as a **service discovery** mechanism and a load balancer.
- **Observability and analytics**: metrics, logs, distributed tracing. Who is calling which API, how many times, with what response time and error rate — data that the API product owner consumes without instrumenting their own code.

What a gateway **doesn’t** do: it doesn’t replace a **service mesh** (mTLS between backend services — that’s the job of **Istio** or **Linkerd**), nor a **WAF** (L7 protection against SQL injection and XSS), nor a **CDN** (edge distribution of static content). It’s the **first layer** of a mature API architecture — not the only one.

## Kong — the plugin Swiss Army knife running on Nginx

**Kong** was born in **2015** at **Mashape** (later **Kong Inc.**) and runs on **OpenResty**, an **Nginx** distribution enriched with a **Lua** interpreter. This technical choice matters: it gives Kong Nginx-level performance — capable of handling **tens of thousands of requests per second** on modest hardware — with the flexibility of a scripting language for plugins.

The plugin catalog is Kong’s headline feature: over **200 official plugins** covering authentication (**JWT**, **OAuth2**, **OpenID Connect**, **mTLS**), security (**rate limiting**, **IP restriction**, **CORS**, **bot detection**), transformation (**request/response transformer**, **gRPC-web**, **Kafka**), logging (**Prometheus**, **Datadog**, **Splunk**, **OpenTelemetry**), and observability. Every plugin is activated via an API call or a YAML declaration — no need to touch the gateway’s core code.

Since version **3.0** (September 2022), Kong supports **DB-less mode**: the configuration is loaded into memory from a declarative YAML or JSON file, with no dependency on **PostgreSQL** or **Cassandra**. The **decK** tool (Declarative Kong config) lets you version this configuration in Git and apply it like code — exactly the workflow a DevOps team expects:

```yaml
# kong.yml — declarative configuration
_format_version: "3.0"
services:
  - name: user-service
    url: http://user-api:8080
    routes:
      - name: user-routes
        paths: ["/users"]
        strip_path: true
    plugins:
      - name: rate-limiting
        config:
          minute: 100
      - name: jwt

```

**Three commands** apply this configuration: `deck gateway sync kong.yml`. No reload, no service interruption — the configuration is applied hot. The shift to **DB-less** mode turned Kong from a heavy gateway (Nginx + Lua + PostgreSQL + migrations) into a single-binary deployment that can be running inside a container in **under 30 seconds**.

The downside of this richness is **operational complexity** once you step outside DB-less mode. The **dashboard** is only available in the paid offering — **Kong Konnect** (SaaS) or **Kong Enterprise**. In pure open-source, you administer Kong from the command line — which requires a DevOps maturity level not every team possesses. Additionally, community plugins vary in quality: an unmaintained plugin can block a Kong version upgrade, and debugging Lua is non-trivial for a team that only knows Python or Go.

**Kong** is the right choice if you have an experienced SRE team, an API catalog numbering in the **dozens**, and customization needs that only an ecosystem of **200+ plugins** can cover. It’s the gateway for large organizations that want a unified control plane — even if that means paying for the Enterprise license to get the dashboard and support.

## Traefik — the gateway that discovers your services without being asked

**Traefik** is the philosophical anti-Kong. Created by **Emile Vauge** in **2015** and written in **Go**, it starts from the premise that a gateway shouldn’t need manual configuration: it should **discover** services, **provision** their certificates, and **route** traffic while you write the `docker-compose.yml` for the next container. As of **July 2026**, Traefik is on version **3.7.x** with near-weekly releases and native integration with **Docker**, **Kubernetes**, **Consul**, **Redis**, and a dozen other providers.

Traefik’s strength is that **configuration lives where the service lives**. A Docker container exposes its routes through labels in its `docker-compose.yml`:

```yaml
labels:
  - "traefik.http.routers.api.rule=Host(`api.domain.com`)"
  - "traefik.http.routers.api.middlewares=rate-limit@file,auth@file"
  - "traefik.http.routers.api.tls.certresolver=letsencrypt"

```

The gateway detects the container, reads its labels, provisions a **Let’s Encrypt** certificate, applies middlewares, and routes traffic — all without touching Traefik’s static configuration. Add a container, it’s automatically exposed; remove it, its route disappears. This behavior is identical on **Kubernetes** via the **IngressRoute** CRD: Traefik watches the Kubernetes API and updates its routing without human intervention.

**Middlewares** are Traefik’s equivalent of Kong plugins, with a smaller but cloud-native-focused catalog: **rate limiting**, **circuit breaker**, **retry**, **headers manipulation**, **IP whitelisting**, **basic auth**, **forward auth** (delegation to an external service like **Authelia** or **Authentik**). The difference from Kong is the configuration model: where Kong centralizes everything in a single declarative file, Traefik distributes configuration across the services themselves — each team controls its own middlewares through their container’s labels.

This model is a **massive accelerator** for teams deploying on **Docker** or **Kubernetes** who want a gateway that configures itself. The trade-off: it becomes hard to audit beyond a **few dozen services** — finding which container has which middleware means scanning every `docker-compose.yml`. Traefik has no native analytics dashboard, only a configuration dashboard showing active routes. For metrics, you need to wire up **Prometheus** and **Grafana** alongside it.

Another limitation: Traefik is **cloud-native first**. If your infrastructure mixes containers, bare-metal VMs, and network appliances, the "everything through labels" model hits its limits — non-containerized services must be declared manually in a static configuration file, breaking the auto-discovery promise.

**Traefik** is the right choice if your infrastructure is **100% containerized**, your teams already practice **GitOps**, and you want a gateway that configures itself rather than one you have to administer. It’s the gateway of committed cloud-native shops — the one that disappears into the infrastructure.

## Tyk — the open-source dashboard that the other two sell you

**Tyk** is the third player, often underestimated because it’s less visible on GitHub. Created in **2014** and written in **Go** like Traefik, it offers one thing neither Kong nor Traefik provides in open-source: a **complete dashboard** with API management, **real-time analytics**, a **developer portal**, and **per-key quota** management.

This is a unique and coherent positioning. Kong has the richest plugin catalog, Traefik has the smoothest auto-discovery, but **Tyk is the only one** to offer a turnkey experience where an admin can create an API, attach a rate limit, generate a key, and visualize calls in a dashboard — all without a command line, without external Prometheus, without a Grafana instance to configure. For a team where the API product owner isn’t an SRE, this difference is decisive.

Tyk works with an **API definition file** (Tyk API Definition, in JSON format) that describes each API’s security policies, transformations, and quotas. Editing can be done through the dashboard — which exposes a YAML editor with validation — or directly in code:

```json
{
  "name": "User API",
  "listen_path": "/users/",
  "target_url": "http://user-service:8080",
  "use_keyless": false,
  "enable_jwt": true,
  "jwt_signing_method": "RS256",
  "rate_limit": {
    "rate": 100,
    "per": 60
  }
}

```

The **dashboard** exposes detailed **analytics** — requests per endpoint, HTTP status codes, latency, errors, most-active keys — answering the question every API product owner asks: "who is using my API, how much, and is it working?" Without Tyk, answering this requires at minimum a **Prometheus export** and a hand-built **Grafana dashboard**.

The **developer portal** lets you publish an API catalog, allow developers to register, and generate keys automatically — a feature **Kong Enterprise** charges for and **Traefik** doesn’t offer natively. For a company exposing its APIs to customers or partners, this portal turns the API into a product: documentation, quota-based pricing, key self-service.

Tyk’s weakness is operational. It requires **Redis** for token and quota storage, and **MongoDB** or **PostgreSQL** for API definitions and analytics. The stack is heavier than a standalone Traefik or a DB-less Kong. The core is open-source under the **MPL license** — permissive, but watch the hybrid licensing: some advanced features (sharding, multi-datacenter, SSO) require a paid license.

**Tyk** is the right choice if you need a **dashboard and analytics without paying for a license**, if your team includes product owners who don’t live on the command line, and if you manage APIs exposed to third parties rather than an internal microservices mesh. It’s the gateway for teams that sell their APIs as a product.

## Verdict — which gateway for which use case

The question isn’t "which is the best" but "which matches your team’s maturity and constraints."

**You deploy on Docker or Kubernetes, you practice GitOps, and your priority is deployment simplicity**: choose **Traefik**. Five labels in a `docker-compose.yml` are enough to expose a service with HTTPS, rate limiting, and authentication. The "configuration per service" model accelerates deployments — but plan for a **Prometheus/Grafana dashboard** alongside it for analytics, and keep in mind that beyond **30 services**, auditing middlewares becomes tedious without additional tooling.

**You manage an API catalog exposed to third parties or partners, with needs for analytics, quotas, and self-service**: choose **Tyk**. The dashboard and developer portal spare you from building a custom management layer. The **Redis + PostgreSQL** stack adds operational overhead, but for a team managing APIs as a product, that overhead is justified — it’s the price of the dashboard and developer portal.

**You have an experienced SRE team, an API catalog of more than 20 APIs, and customization needs that only plugins can cover**: choose **Kong**. The **200+ plugins** and declarative mode with **decK** make it the choice for demanding environments. If you miss having a dashboard, **Kong Konnect** in SaaS mode is an option — but it comes at a price, and it ties you to the Kong ecosystem.

In all three cases, the rule is the same: **put a gateway in front of your APIs before you need one**. The cost of a gateway — even a suboptimal choice — is always lower than the cost of an API exposed without control, without quotas, and without visibility.

## References

- [Kong Gateway — Official Documentation](https://docs.konghq.com/?ref=ettayeb.fr)
- [Traefik v3.7 — Documentation](https://doc.traefik.io/traefik/?ref=ettayeb.fr)
- [Tyk API Gateway — Documentation](https://tyk.io/docs/?ref=ettayeb.fr)
- [Kong decK — Declarative Configuration](https://github.com/Kong/deck?ref=ettayeb.fr)
- [Tyk — Open-Source GitHub Repository](https://github.com/TykTechnologies/tyk?ref=ettayeb.fr)