API网关设计

Design API gateways for routing, security, and traffic management in microservices.

65|15|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/microwind/ai-skills --skill api-microwind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: API网关设计
Source: https://github.com/microwind/ai-skills/tree/main/microservices/api-gateway
Command: npx skills add https://github.com/microwind/ai-skills --skill api-microwind

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

API gateway design centralizes routing, security, and observability to simplify and secure microservice architectures.

Core Features & Use Cases

  • Routing management: dynamic path rules, service discovery integration, and load balancing.
  • Security and access control: authentication, authorization, API keys, and TLS considerations.
  • Traffic governance: rate limiting, circuit breakers, retries, and global policies.
  • Observability: centralized logging, metrics, and health checks for gateway routes.
  • Use cases: protect APIs behind a single entry point, version APIs, and apply cross-cutting policies consistently.

Quick Start

Create a gateway route to forward /api/users/* to the user-service and enable a JWT authentication filter.

Frequently Asked Questions about API网关设计

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I centralize routing and authentication for microservices?

You design an API gateway to act as a single entry point for microservices, centralizing routing rules, JWT authentication filters, and cross-cutting security policies across all backend services.

How does a circuit breaker work in API gateway traffic management?

A circuit breaker in API gateway traffic management stops forwarding requests to a failing downstream service, preventing cascading failures and allowing recovery while returning fallback responses to the client.

Can I apply rate limiting and load balancing at the API gateway level?

Yes, API gateway design supports applying rate limiting and load balancing at the gateway level to govern traffic volume and distribute requests across multiple service instances.

Do I need service discovery integration to implement API versioning?

Service discovery integration is not strictly required for API versioning, but combining dynamic path rules with service discovery allows the gateway to automatically route versioned APIs to available backend instances.

What's the best way to monitor health checks and observability across gateway routes?

The best way to monitor health checks and observability across gateway routes is to centralize logging and metrics at the gateway level, continuously checking downstream service availability before forwarding traffic.

Why use a single entry point for API security instead of per-service authentication?

Using a single entry point for API security centralizes TLS termination, API keys, and authorization policies, ensuring cross-cutting security rules are applied consistently without duplicating authentication logic in every microservice.