Communitygithub.com

API 게이트웨이 & 리버스 프록시 전문가

Kong, Nginx, Traefik을 사용한 API 게이트웨이 및 리버스 프록시 구성, 라우팅, 인증 미들웨어 설정을 안내합니다.

API 게이트웨이 & 리버스 프록시 전문가란 무엇인가요?

이 스킬은 Kong, Nginx, Traefik 등 주요 기술을 활용하여 API 게이트웨이와 리버스 프록시를 구성하고 최적화하는 방법을 제공합니다. 라우팅, 인증(JWT, OAuth2, mTLS, API 키), 속도 제한, 트래픽 관리를 위한 의사 결정 트리와 실패 모드 분석, 품질 관문 체크리스트를 포함합니다. AWS API Gateway, Azure Application Gateway와 같은 클라우드 관리형 솔루션도 다루며, 서비스 메시나 속도 제한 알고리즘 같은 영역은 명시적으로 제외하여 적절한 도메인 경계를 유지합니다. 실제 작업 예제(전자상거래 API 게이트웨이 설정, 카나리 배포 장애 시나리오)와 품질 관문을 통해 실무에서 바로 적용 가능한 모범 사례를 제공합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/api-gateway-reverse-proxy-expert

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

API 게이트웨이 & 리버스 프록시 전문가은(는) 무엇을 하나요?

라우팅, 인증, 속도 제한, 트래픽 관리를 위한 API 게이트웨이와 리버스 프록시를 구성하고 최적화합니다.

결정 지점

인증 전략 선택

트래픽 패턴 및 요구 사항
├── 내부 서비스 전용
│   └── API 키 인증
│       ├── 낮은 복잡성, 빠른 검증
│       └── Kong: key-auth 플러그인, Traefik: forwardAuth
├── 세션이 필요한 고객 대면 API
│   └── JWT 인증
│       ├── 상태 비저장, 사용자 클레임 포함
│       └── Kong: jwt 플러그인, Nginx: lua-resty-jwt
├── 엔터프라이즈 B2B 통합
│   └── mTLS 인증
│       ├── 인증서 기반, 최고 보안
│       └── Kong: mtls-auth, Nginx: ssl_verify_client
└── 타사 SaaS 통합
    └── OAuth2 흐름
        ├── 토큰 교환, 위임 인증
        └── Kong: oauth2 플러그인, AWS API Gateway: authorizer

게이트웨이 기술 선택

요구 사항 → 선택
├── 플러그인 생태계 및 GUI 필요
│   └── Kong Enterprise/OSS
├── Kubernetes 네이티브, 자동 검색
│   └── Traefik v3 또는 Ingress-NGINX
├── 최대 성능, 최소 기능
│   └── Nginx 또는 Envoy
└── 클라우드 관리형, 서버리스 스케일링
    └── AWS API Gateway 또는 Azure Application Gateway

업스트림 라우팅 전략

서비스 아키텍처 → 라우팅 방법
├── 서비스 검색이 있는 마이크로서비스
│   └── 동적 업스트림 대상
│       ├── Consul/Eureka 통합
│       └── 상태 확인 기반 로드 밸런싱
├── 정적 백엔드 서비스
│   └── 고정 업스트림 풀
│       ├── 라운드 로빈 또는 최소 연결
│       └── 카나리 배포를 위한 가중치 라우팅
└── 다중 지역 배포
    └── 지리적 라우팅
        ├── 지연 시간 기반 또는 Geo-IP
        └── 보조 지역으로 폴백

실패 모드

게이트웨이 시간 초과 연쇄

증상: 부하 시 느린 API 응답(>10초)
탐지: 응답 시간이 급증하는 동안 업스트림 서비스는 정상 지연 시간 보고
근본 원인: 게이트웨이 시간 초과가 업스트림 시간 초과보다 커서 요청 큐잉 발생
수정: 게이트웨이 읽기 시간 초과를 업스트림 시간 초과보다 작게 설정 (게이트웨이: 30초, 업스트림: 25초)

인증 우회

증상: 승인되지 않은 요청이 백엔드 서비스에 도달
탐지: 백엔드 로그에 예상 인증 헤더 없는 요청 표시
근본 원인: 라우트 순서로 인해 허용 규칙이 인증 규칙보다 먼저 일치
수정: 인증 미들웨어를 전역 수준으로 이동하거나 특정 라우트가 설정에서 먼저 오도록 보장

회로 차단기 쓰래싱

증상: 트래픽 급증 시 간헐적 503 오류
탐지: 회로 차단기가 빠르게 열림/닫힘 (분당 여러 번)
근본 원인: 임계값이 너무 민감하거나 상태 확인이 잘못 구성됨
수정: 실패 임계값(5+ 실패) 및 복구 시간(최소 30초) 조정

SSL 인증서 만료

증상: HTTPS 핸드셰이크 실패, 브라우저 인증서 경고
탐지: SSL 인증서 확인 결과 30일 이내 만료
근본 원인: 수동 인증서 관리, 갱신 자동화 없음
수정: cert-manager(K8s) 또는 ACME 클라이언트를 통한 자동 갱신 구현

리소스 고갈

증상: 게이트웨이 연결 수락 중단, 메모리/CPU 100%
탐지: 연결 거부 오류, 게이트웨이 상태 확인 실패
근본 원인: 연결 제한 없음 또는 플러그인 메모리 누수
수정: worker_connections(Nginx) 또는 연결 풀 제한(Kong) 설정, 게이트웨이 재시작

작업 예제

시나리오: 전자상거래 API 게이트웨이 설정

컨텍스트: 주문, 재고, 결제를 처리하는 마이크로서비스에 Kong 배포, JWT 인증 사용

1단계: 라우트 정의

# 먼저 서비스 엔드포인트 식별
services:
  - orders: /api/v1/orders/* → http://orders:8080
  - inventory: /api/v1/inventory/* → http://inventory:8080  
  - payments: /api/v1/payments/* → http://payments:8080

2단계: 의사 결정 트리 적용

  • 트래픽 패턴: 고객 대면 API → JWT 인증
  • 아키텍처: 마이크로서비스 → 동적 업스트림 대상
  • 요구 사항: 플러그인 생태계 필요 → Kong 선택

3단계: 플러그인 순서 지정

# 올바른 순서로 플러그인 적용
plugins:
  1. cors (인증 전)
  2. jwt (인증) 
  3. rate-limiting (인증 후)
  4. request-transformer (마지막)

전문가 vs 초보자:

  • 초보자 실수: 인증 전에 속도 제한 적용 (익명 사용자가 할당량 소비)
  • 전문가 접근: 인증 먼저, 그 다음 인증된 사용자별 속도 제한
  • 초보자 실수: 전역 CORS 정책 사용
  • 전문가 접근: 라우트별로 다른 CORS (orders는 관리자 출처 허용, payments는 프론트엔드로만 제한)

장애 시나리오: 카나리 배포 실패

상황: 새 주문 서비스 버전에 20% 트래픽 배포, 500 오류 발생

탐지 과정:

  1. 게이트웨이 메트릭 확인: 500 오류율이 배포 시간과 일치
  2. 업스트림 상태 확인: 새 버전 상태 확인 실패
  3. 게이트웨이 로그: 업스트림 연결 시간 초과

롤백 절차:

# 1단계: 즉시 트래픽 전환
kong:
  routes:
    - service: orders-v1
      weight: 100  # 이전 80
    - service: orders-v2  
      weight: 0    # 이전 20

# 2단계: 롤백 검증
curl -H "Authorization: Bearer $JWT" \
  https://api.company.com/orders/health

# 3단계: 실패한 업스트림 제거
kubectl scale deployment orders-v2 --replicas=0

근본 원인 분석: 새 버전에서 데이터베이스 연결 풀 설정 오류로 부하 시 시간 초과 발생

품질 관문

  • 모든 라우트에 명시적 경로 일치 지정 (catch-all /* 라우트 없음)
  • 비즈니스 로직 플러그인보다 먼저 인증 미들웨어 구성
  • 상태 확인이 5초 이내에 정상 업스트림에 대해 2xx 반환
  • 회로 차단기 임계값 설정: 60초 윈도우 내 5회 실패, 30초 복구
  • TLS 인증서가 만료 30일 이상 전에 자동 갱신
  • 속도 제한이 전역이 아닌 인증된 사용자별로 적용
  • CORS 정책이 필요한 도메인으로만 출처 제한
  • 게이트웨이 시간 초과(30초) < 업스트림 시간 초과(25초)로 연쇄 방지
  • 액세스 로그에 요청 추적을 위한 상관관계 ID 포함
  • 고가용성을 위해 최소 2개 복제본으로 게이트웨이 배포

NOT-FOR 경계

이 스킬은 다음을 처리합니다: 게이트웨이 구성, 라우팅 규칙, 인증 미들웨어, 리버스 프록시 설정

다음은 처리하지 않습니다:

  • 속도 제한 알고리즘 설계 → api-rate-limiting-throttling-expert 사용
  • 서비스 메시 데이터 플레인 구성 → service-mesh-microservices-expert 사용
  • API 명세 및 설계 → api-architect 사용
  • 데이터베이스 연결 풀링 → database-performance-expert 사용
  • 컨테이너 오케스트레이션 → kubernetes-expert 또는 docker-expert 사용
  • SSL 인증서 생성 → security-infrastructure-expert 사용

위임 규칙:

  • 커스텀 속도 제한 알고리즘의 경우: "속도 제한 플러그인을 구성하겠지만, 커스텀 알고리즘이 필요하면 api-rate-limiting-throttling-expert를 사용하세요."
  • 서비스 검색 설정의 경우: "업스트림 대상을 구성하겠지만, 서비스 메시 설정이 필요하면 service-mesh-microservices-expert를 사용하세요."

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

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/windags-skills

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/windags-skills

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/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- 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/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Cryptographic security for agentic systems — zero-trust agent networking, signed message envelopes (JWS/JWE), capability-based security (ocaps), Merkle tree audit trails, WASM sandboxing, and formal verification. Covers CLI dev tool security, mTLS between agents, permission boundaries (least privilege for AI agents), and supply chain security for skills/plugins. Activate on: "agent security", "zero trust agents", "secure agent communication", "capability-based security", "ocap", "signed messages between agents", "agent audit trail", "sandbox agent execution", "agent permissions", "mTLS agents", "cryptographic verification", "agent supply chain", "OWASP agentic", "prove agent did X", "tamper-proof agent logs". NOT for: application-level SAST scanning (use security-auditor), network firewall rules (use infrastructure), SOC2/HIPAA compliance (organizational), or prompt injection defense (use prompt-engineer).

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

관련 스킬