agentleFS
roedyrustamroedyrustam/vibes-plug/skills/api-gateway-proxy-expert/SKILL.md

api-gateway-proxy-expert

Skill75 starsChanged 38 days agoMITView on GitHub

Expert guide for API Gateways, Reverse Proxies, and Service Mesh. Covers Kong, Traefik, NGINX, Cloudflare Gateway, and load balancing / Panduan ahli untuk API Gateway, Reverse Proxy, dan Service Mesh.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When architecting a microservices backend that needs a unified entry point (BFF - Backend for Frontend).

    line 21
  2. Distinctive:

    When configuring SSL/TLS termination, rate limiting, or IP allowlisting at the infrastructure level.

    line 22
  3. Distinctive:

    When the user asks about "Traefik", "NGINX config", "Kong", or "API routing".

    line 23
  4. Distinctive:

    When implementing blue-green deployments or canary releases via traffic splitting.

    line 24
  5. Distinctive:

    Instead of client applications calling individual microservices, route all traffic through an API Gateway.

    line 29
  6. Very specific:

    Routing: Use path-based routing (e.g., /api/users -> Users Service, /api/billing -> Billing Service).

    line 31
  7. Distinctive:

    Cloudflare (Edge): Use Cloudflare rules for edge-level caching, WAF, and DDoS protection before traffic even reaches your origin proxy.

    line 37
  8. Distinctive:

    Timeouts: Always configure strict proxy read/write timeouts to prevent stalled connections from exhausting worker pools.

    line 40
  9. Very specific:

    X-Forwarded Headers: Ensure your proxy correctly sets X-Forwarded-For and X-Forwarded-Proto so backend services know the client's real IP …

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Gateway & Reverse Proxy Expert

English | Bahasa Indonesia


<a name="english"></a>

English

Description

A comprehensive guide for routing, load balancing, and managing traffic at the perimeter of your microservices architecture. Covers configuring API Gateways (Kong, Tyk), modern reverse proxies (Traefik, Caddy, NGINX), and understanding Service Mesh patterns.

Trigger Conditions

  • When architecting a microservices backend that needs a unified entry point (BFF - Backend for Frontend).
  • When configuring SSL/TLS termination, rate limiting, or IP allowlisting at the infrastructure level.
  • When the user asks about "Traefik", "NGINX config", "Kong", or "API routing".
  • When implementing blue-green deployments or canary releases via traffic splitting.

Core Architectural Guidelines

1. API Gateway Pattern

Instead of client applications calling individual microservices, route all traffic through an API Gateway.

  • Cross-Cutting Concerns: Offload authentication (JWT verification), rate limiting, and CORS handling to the Gateway.
  • Routing: Use path-based routing (e.g., /api/users -> Users Service, /api/billing -> Billing Service).

2. Tool Selection

  • Traefik: Best for Docker/Kubernetes environments due to its auto-discovery capabilities via labels/annotations.
  • Caddy: Best for simplicity and automatic HTTPS (Let's Encrypt provisioning).
  • Kong API Gateway: Best for enterprise environments requiring extensive plugins (OIDC, rate limiting, analytics).
  • Cloudflare (Edge): Use Cloudflare rules for edge-level caching, WAF, and DDoS protection before traffic even reaches your origin proxy.

3. Configuration Best Practices

  • Timeouts: Always configure strict proxy read/write timeouts to prevent stalled connections from exhausting worker pools.
  • Health Checks: Configure active health checks so the proxy can automatically remove failing backend instances from the load balancer pool.
  • X-Forwarded Headers: Ensure your proxy correctly sets X-Forwarded-For and X-Forwarded-Proto so backend services know the client's real IP and protocol.

Orchestration & Integration

  • Sits in front of js-backend-expert, go-programming-expert, and rust-programming-expert services.
  • Offloads work from rate-limit-abuse-prevention by handling rate limits at the L7 proxy layer.
  • Complements ci-cd-devops-architect when configuring Docker Compose or Kubernetes Ingress.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan komprehensif untuk routing, load balancing, dan manajemen trafik di lapisan terluar (perimeter) arsitektur microservices. Mencakup konfigurasi API Gateway (Kong), reverse proxy modern (Traefik, Caddy, NGINX), dan Service Mesh.

Kondisi Pemicu

  • Saat merancang backend microservices yang membutuhkan satu pintu masuk terpadu (BFF).
  • Saat mengonfigurasi terminasi SSL/TLS, rate limiting, atau IP allowlisting di tingkat infrastruktur.
  • Saat menerapkan rilis canary atau blue-green deployment melalui pembagian trafik (traffic splitting).

Panduan Arsitektur Inti

1. Pola API Gateway

Jangan biarkan klien (frontend/mobile) memanggil microservices secara langsung.

  • Gunakan Gateway untuk menangani masalah lintas-layanan (cross-cutting) seperti verifikasi JWT, CORS, dan rate limiting.
  • Gunakan routing berbasis path (jalur).

2. Pemilihan Tool

  • Traefik: Pilihan terbaik untuk lingkungan Docker/Kubernetes karena penemuan layanan otomatis (auto-discovery) melalui label.
  • Caddy: Pilihan terbaik untuk kemudahan setup dan HTTPS otomatis (Let's Encrypt).
  • Kong: Standar industri untuk kebutuhan Enterprise dengan sistem plugin yang kuat.
  • Cloudflare: Lini pertahanan pertama untuk WAF dan perlindungan DDoS di sisi Edge.

3. Praktik Terbaik Konfigurasi

  • Timeouts: Selalu tetapkan batas waktu (timeout) koneksi proxy untuk mencegah server kehabisan resource karena koneksi yang menggantung.
  • Health Checks: Aktifkan health check agar proxy tidak mengirimkan request ke service yang sedang mati.
  • Header X-Forwarded: Pastikan proxy menyertakan header X-Forwarded-For agar backend mengetahui IP asli klien.

Integrasi Orkestrasi

  • Berada di depan service yang dibangun dengan js-backend-expert, go-programming-expert, atau rust-programming-expert.
  • Bekerja sama dengan ci-cd-devops-architect untuk konfigurasi Ingress Kubernetes atau Docker Compose.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.