infra-routing-layer-selector

Selects infrastructure routing layers for client-to-backend traffic flows.

1|Updated Jan 13, 2023
One-click install
npx skills add https://github.com/theodrosyimer/.dotfiles --skill infra-routing-layer-selector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infra-routing-layer-selector
Source: https://github.com/theodrosyimer/.dotfiles/tree/main/claude/skills/arch__infra-routing-layer-selector
Command: npx skills add https://github.com/theodrosyimer/.dotfiles --skill infra-routing-layer-selector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams decide which combination of reverse proxy, load balancer, API gateway, and CDN best fits their client-to-backend traffic flows, preventing over- or under-engineering and aligning infrastructure to real requirements.

Core Features & Use Cases

  • Capability mapping: Matches needs like SSL termination, L4 vs L7 routing, caching, auth, rate limiting, and health checks to the minimal set of layers required.
  • Pattern recommendations: Suggests layered architectures (single instance, scaled, microservices, public API) and diagrams the request flow and migration path.
  • Tool guidance: Recommends concrete tools (Nginx, HAProxy, Kong, ALB/NLB, Traefik, CDN options) tailored to stack and deployment scenarios.

Quick Start

Recommend which routing layers and tools to use for a NestJS backend with multiple instances, external mobile clients, and a requirement for centralized auth and rate limiting.

Frequently Asked Questions about infra-routing-layer-selector

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

FAQPage Schema
What is the difference between a reverse proxy, load balancer, and API gateway for traffic routing?

An API gateway centralizes crosscutting concerns like auth, rate limiting, and caching for client-to-backend request flows, whereas a load balancer primarily distributes traffic across instances using L4 or L7 health checks. A reverse proxy handles L7 routing and SSL termination, while a CDN caches static content at the network edge.

How do I decide which routing layers to use for my backend deployment architecture?

To decide which routing layers to use, map your capability requirements—such as SSL termination, L4 vs L7 routing, caching, auth, rate limiting, and health checks—to the minimal set of layers required. This prevents under-engineering and aligns your infrastructure to real traffic requirements.

Where should SSL termination and rate limiting live in my microservices architecture?

SSL termination and rate limiting should live at specific infrastructure routing layers based on your microservices pattern. SSL termination typically happens at the CDN or reverse proxy layer, while rate limiting and auth are centralized at the API gateway to manage client-to-backend request flows effectively.

Do I need a CDN if I already have a load balancer and reverse proxy for my API?

You need a CDN in addition to a load balancer and reverse proxy if your traffic routing requires edge caching for static assets and closer proximity to external clients. A CDN reduces backend load, while the load balancer and reverse proxy handle internal traffic distribution and L7 routing.

What is the best way to migrate from a single reverse proxy to a layered API gateway architecture?

The best way to migrate from a single reverse proxy to a layered architecture is to follow a suggested migration path that diagrams the request flow. Map capabilities like auth and rate limiting to a new API gateway layer, scale with load balancers, and select appropriate tools like Nginx, Kong, or Traefik for your deployment scenario.

Can I use Nginx for both L4 load balancing and L7 API gateway routing?

Nginx can be used for both L4 and L7 traffic routing, handling SSL termination and reverse proxy capabilities. However, for complex microservices deployment architectures requiring advanced crosscutting concerns like centralized auth and rate limiting, pairing it with a dedicated API gateway like Kong or Traefik may be recommended.