본문으로 건너뛰기
cccskills
무료GitHub에 공개

api-gateway-reverse-proxy-expert

API gateway and reverse proxy configuration with Kong, Nginx, Traefik, routing, and auth middleware. Activate on: API gateway, reverse proxy, Kong, Nginx, Traefik, load balancer, ingress, auth middleware. NOT for: rate limiting algorithms (use api-rate-limiting-throttling-expert), service mesh (use service-mesh-microservices-expert).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구AWSKubernetes
설치 방법 보기

포함된 파일(1)

  • SKILL.md8.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

API Gateway & Reverse Proxy Expert

Configure and optimize API gateways and reverse proxies for routing, authentication, rate limiting, and traffic management.

Decision Points

Authentication Strategy Selection

Traffic Pattern & Requirements
├── Internal services only
│   └── API Key authentication
│       ├── Low complexity, fast validation
│       └── Kong: key-auth plugin, Traefik: forwardAuth
├── Customer-facing API with session needs
│   └── JWT authentication
│       ├── Stateless, includes user claims
│       └── Kong: jwt plugin, Nginx: lua-resty-jwt
├── Enterprise B2B integration
│   └── mTLS authentication
│       ├── Certificate-based, highest security
│       └── Kong: mtls-auth, Nginx: ssl_verify_client
└── Third-party SaaS integration
    └── OAuth2 flow
        ├── Token exchange, delegated auth
        └── Kong: oauth2 plugin, AWS API Gateway: authorizer

Gateway Technology Selection

Requirements → Choice
├── Plugin ecosystem & GUI needed
│   └── Kong Enterprise/OSS
├── Kubernetes-native with auto-discovery
│   └── Traefik v3 or Ingress-NGINX
├── Maximum performance, minimal features
│   └── Nginx or Envoy
└── Cloud-managed, serverless scaling
    └── AWS API Gateway or Azure Application Gateway

Upstream Routing Strategy

Service Architecture → Routing Method
├── Microservices with service discovery
│   └── Dynamic upstream targets
│       ├── Consul/Eureka integration
│       └── Health check based load balancing
├── Static backend services
│   └── Fixed upstream pools
│       ├── Round-robin or least-connections
│       └── Weighted routing for canary deployments
└── Multi-region deployment
    └── Geographic routing
        ├── Latency-based or geo-IP
        └── Fallback to secondary regions

Failure Modes

Gateway Timeout Cascade

Symptom: Slow API responses (>10s) under load
Detection: Response times spike while upstream services report normal latency
Root Cause: Gateway timeout higher than upstream timeout, causing request queuing
Fix: Set gateway read timeout < upstream timeout (gateway: 30s, upstream: 25s)

Authentication Bypass

Symptom: Unauthorized requests reaching backend services
Detection: Backend logs show requests without expected auth headers
Root Cause: Route order allows permissive rules to match before auth rules
Fix: Move auth middleware to global level or ensure specific routes come first in config

Circuit Breaker Thrashing

Symptom: Intermittent 503 errors during traffic spikes
Detection: Circuit breaker opens/closes rapidly (multiple times per minute)
Root Cause: Threshold too sensitive or health check misconfigured
Fix: Tune failure threshold (5+ failures) and recovery time (30s minimum)

SSL Certificate Expiry

Symptom: HTTPS handshake failures, browser certificate warnings
Detection: SSL cert check shows expiry within 30 days
Root Cause: Manual certificate management without renewal automation
Fix: Implement cert-manager (K8s) or ACME client with auto-renewal

Resource Exhaustion

Symptom: Gateway stops accepting connections, memory/CPU at 100%
Detection: Connection refused errors, gateway health checks failing
Root Cause: No connection limits or memory leaks in plugins
Fix: Set worker_connections (Nginx) or connection pool limits (Kong), restart gateway

Worked Examples

Scenario: E-commerce API Gateway Setup

Context: Deploy Kong for microservices handling orders, inventory, payments with JWT auth

Step 1: Route Definition

# Identify service endpoints first
services:
  - orders: /api/v1/orders/* → http://orders:8080
  - inventory: /api/v1/inventory/* → http://inventory:8080  
  - payments: /api/v1/payments/* → http://payments:8080

Step 2: Apply Decision Tree

  • Traffic pattern: Customer-facing API → JWT authentication
  • Architecture: Microservices → Dynamic upstream targets
  • Requirements: Plugin ecosystem needed → Kong selected

Step 3: Plugin Ordering

# Apply plugins in correct order
plugins:
  1. cors (pre-auth)
  2. jwt (authentication) 
  3. rate-limiting (post-auth)
  4. request-transformer (last)

Expert vs Novice:

  • Novice mistake: Applies rate limiting before authentication (anonymous users consume quota)
  • Expert approach: Auth first, then rate limit per authenticated user
  • Novice mistake: Uses global CORS policy
  • Expert approach: Different CORS per route (orders allows admin origins, payments restricts to frontend only)

Failure Scenario: Canary Deployment Gone Wrong

Situation: Deployed 20% traffic to new orders service version, seeing 500 errors

Detection Process:

  1. Check gateway metrics: 500 rate spike correlates with deployment time
  2. Upstream health checks: New version failing health checks
  3. Gateway logs: Upstream connection timeouts

Rollback Procedure:

# Step 1: Immediate traffic shift
kong:
  routes:
    - service: orders-v1
      weight: 100  # Was 80
    - service: orders-v2  
      weight: 0    # Was 20

# Step 2: Validate rollback
curl -H "Authorization: Bearer $JWT" \
  https://api.company.com/orders/health

# Step 3: Remove failed upstream
kubectl scale deployment orders-v2 --replicas=0

Root Cause Analysis: New version had database connection pool misconfiguration, causing timeouts under load

Quality Gates

  • All routes have explicit path matching (no catch-all /* routes)
  • Authentication middleware configured before business logic plugins
  • Health checks return 2xx for healthy upstreams within 5 seconds
  • Circuit breaker thresholds set: 5 failures in 60s window, 30s recovery
  • TLS certificates auto-renew with 30+ days before expiry
  • Rate limiting applied per authenticated user, not globally
  • CORS policy restricts origins to required domains only
  • Gateway timeout (30s) < upstream timeout (25s) to prevent cascades
  • Access logs include correlation ID for request tracing
  • Gateway deployed with minimum 2 replicas for high availability

NOT-FOR Boundaries

This skill handles: Gateway configuration, routing rules, authentication middleware, reverse proxy setup

NOT for:

  • Rate limiting algorithm design → Use api-rate-limiting-throttling-expert
  • Service mesh data plane configuration → Use service-mesh-microservices-expert
  • API specification and design → Use api-architect
  • Database connection pooling → Use database-performance-expert
  • Container orchestration → Use kubernetes-expert or docker-expert
  • SSL certificate generation → Use security-infrastructure-expert

Delegation Rules:

  • For custom rate limiting algorithms: "I'll configure the rate limiting plugin, but for custom algorithms, use api-rate-limiting-throttling-expert"
  • For service discovery setup: "I'll configure upstream targets, but for service mesh setup, use service-mesh-microservices-expert"

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Apply cognitive task analysis to expert work that depends on perceptual cues, branching judgment, and recurring monitoring loops. Use when decomposing expert capability into agent structure, simulation design, or validation interviews. NOT for ordinary step-by-step SOP capture or simple pipelines with no tacit cue layer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

curiositech의 스킬 모두 보기

이 스킬의 문제 신고