Gateway Offloading Pattern: Delegate Cross-Cutting Concerns
TL;DR
Gateway Offloading moves shared cross-cutting concerns (SSL/TLS termination, authentication, compression, rate limiting) from backend services to a centralized gateway. This simplifies backend services, reduces code duplication, and enables consistent policy enforcement across all services. Think of it as having a security checkpoint at the building entrance instead of requiring every office to verify IDs independently.
Cheat Sheet: SSL termination at gateway = simpler backends + centralized certificate management. Offload authentication, compression, rate limiting, logging to reduce backend complexity. Gateway becomes single point of failure—design for high availability.
The Analogy
Imagine a large office building where every department used to handle its own security checks, visitor badges, and metal detectors. This meant each department needed security staff, equipment, and training. Gateway Offloading is like consolidating all security to the building’s main entrance. Now, once visitors pass the entrance checkpoint, they can freely move between departments without repeated checks. The entrance (gateway) handles ID verification, badge printing, and security screening, while individual departments (backend services) focus on their core work. If you need to upgrade security protocols or add facial recognition, you only change it at the entrance, not in every department.
Why This Matters in Interviews
Gateway Offloading appears in discussions about microservices architecture, API gateway design, and security patterns. Interviewers want to see that you understand the tradeoff between centralized control and distributed complexity. Mid-level engineers should explain what gets offloaded and why. Senior engineers should discuss the operational implications—certificate rotation, gateway availability, performance bottlenecks. Staff+ engineers should address when NOT to offload (latency-sensitive operations, service-specific logic) and how to prevent the gateway from becoming a monolithic bottleneck. This pattern frequently comes up when designing systems like Netflix’s Zuul, Amazon API Gateway, or when discussing how Stripe handles authentication across thousands of API endpoints.
Core Concept
Gateway Offloading is a design pattern where shared service functionality is moved from individual backend services to a centralized gateway proxy. Instead of every microservice implementing SSL/TLS termination, authentication, request logging, compression, and rate limiting independently, these concerns are handled once at the gateway layer. This pattern emerged from the microservices revolution at companies like Netflix and Amazon, where managing hundreds of services made code duplication and inconsistent policy enforcement a major operational burden.
The pattern addresses a fundamental tension in distributed systems: how do you enforce consistent cross-cutting concerns without forcing every service team to implement and maintain the same boilerplate code? When you have 50 microservices, each handling its own SSL certificates means 50 certificate renewal processes, 50 potential security vulnerabilities, and 50 places where configuration drift can occur. Gateway Offloading centralizes these concerns, trading some architectural complexity (now you have a critical gateway component) for operational simplicity and consistency.
The key insight is distinguishing between business logic (which belongs in services) and infrastructure concerns (which can be standardized). SSL termination doesn’t vary between your payment service and your user service—both need the same security standards. Authentication might have service-specific authorization rules, but the token validation logic is identical. By offloading these shared concerns to the gateway, backend services become simpler, development teams move faster, and security teams can enforce policies uniformly across the entire system.
How It Works
Step 1: Client Request Arrives at Gateway A client (mobile app, web browser, or another service) sends an HTTPS request to the gateway. The gateway is the single entry point for all external traffic, sitting at the edge of your infrastructure. At this point, the request is still encrypted with TLS, and the client knows nothing about your internal service topology.
Step 2: SSL/TLS Termination The gateway terminates the SSL/TLS connection, decrypting the request. This is the first major offloading operation. The gateway holds the SSL certificates, handles the cryptographic handshake, and manages certificate rotation. Backend services receive plain HTTP requests over a trusted internal network, eliminating the need for each service to manage certificates or perform expensive decryption operations. At Netflix, this saved significant CPU resources across thousands of service instances.
Step 3: Authentication and Authorization The gateway validates authentication tokens (JWT, OAuth, API keys). It checks if the token is valid, not expired, and properly signed. For simple cases, the gateway might also perform authorization checks (“Does this user have access to this API?”). The gateway can enrich the request with user context—adding headers like X-User-ID or X-Tenant-ID that backend services can trust without re-validating. This is offloading: the backend service receives a request that’s already been authenticated, so it can skip that entire code path.
Step 4: Cross-Cutting Concerns Processing The gateway applies additional offloaded functionality: request logging (capturing every API call for audit trails), rate limiting (enforcing “100 requests per minute per user” without backend involvement), request/response compression (gzip encoding to reduce bandwidth), and request transformation (converting REST to gRPC for internal services). Each of these would otherwise require code in every backend service.
Step 5: Routing to Backend Service The gateway routes the request to the appropriate backend service based on URL path, headers, or other routing rules. The request is now simplified—it’s unencrypted, authenticated, logged, and rate-limited. The backend service receives it over HTTP on the internal network, processes the business logic, and returns a response.
Step 6: Response Processing and Return The gateway receives the backend response, applies any response transformations (compression, header manipulation), re-encrypts it with TLS, and returns it to the client. The backend service never dealt with SSL, compression, or client-specific concerns—it just processed the business logic.
Gateway Offloading Request Flow
graph LR
Client["Client<br/><i>Mobile/Web</i>"]
Gateway["API Gateway<br/><i>Offloading Layer</i>"]
Auth["Auth Service<br/><i>Token Validation</i>"]
RateLimit[("Redis<br/><i>Rate Limit State</i>")]
Backend["Backend Service<br/><i>Business Logic</i>"]
Client --"1. HTTPS Request<br/>(Encrypted)"--> Gateway
Gateway --"2. SSL Termination<br/>(Decrypt)"--> Gateway
Gateway --"3. Validate JWT"--> Auth
Auth --"4. Token Valid"--> Gateway
Gateway --"5. Check Rate Limit"--> RateLimit
RateLimit --"6. Within Limit"--> Gateway
Gateway --"7. HTTP Request<br/>(Plain, Authenticated)"--> Backend
Backend --"8. Business Logic<br/>Response"--> Gateway
Gateway --"9. HTTPS Response<br/>(Re-encrypted)"--> Client
A typical request flow through a gateway with offloaded SSL termination, authentication, and rate limiting. The backend service receives a simplified, pre-validated request over plain HTTP on the internal network, eliminating the need for certificate management and authentication logic in the service itself.
Key Principles
Principle 1: Centralize Infrastructure Concerns, Distribute Business Logic Offload only the functionality that’s truly shared and infrastructure-related. SSL termination, authentication token validation, and request logging are perfect candidates—they’re identical across services. Service-specific authorization rules (“Can user X edit document Y?”) should stay in the backend service because they require business context. The decision framework: if the logic requires database queries or business rules, it’s not offloadable. If it’s purely technical (cryptography, compression, protocol translation), it belongs in the gateway. Stripe offloads authentication but keeps fine-grained permissions in individual services because permission logic varies by API endpoint and requires understanding of account relationships.
Principle 2: Design for Gateway Failure The gateway becomes a single point of failure, so it must be highly available. This means running multiple gateway instances behind a load balancer, ensuring stateless operation (no session affinity), and implementing health checks. At Uber, API gateways run in multiple availability zones with automatic failover. If a gateway instance crashes, traffic immediately routes to healthy instances. The principle: never let the gateway hold state that can’t be lost. Session data goes in Redis, not in-memory. Configuration comes from a distributed config service, not local files. This enables horizontal scaling and fast recovery.
Principle 3: Minimize Gateway Latency Every offloaded operation adds latency. SSL termination adds 1-5ms, authentication validation might add 5-10ms, rate limiting checks add 1-2ms. These accumulate. The principle is to offload only what provides clear value and to optimize aggressively. Use connection pooling to backend services, cache authentication results (“This token is valid for the next 5 minutes”), and avoid synchronous external calls from the gateway. Twitter’s API gateway caches rate limit counters in local memory with periodic sync to avoid hitting Redis on every request. The goal: keep P99 gateway latency under 10ms for simple pass-through requests.
Principle 4: Provide Escape Hatches Some services need to bypass offloaded functionality. A health check endpoint shouldn’t require authentication. A webhook receiver might need raw request bodies without decompression. The principle: make offloading the default but allow opt-out. This is typically done through configuration annotations or service metadata. At Amazon, services can mark specific endpoints as “bypass-auth” or “bypass-rate-limit” in their service registry. This prevents the gateway from becoming a rigid constraint that forces workarounds.
Principle 5: Observability is Non-Negotiable When the gateway handles authentication, rate limiting, and routing, it becomes the source of truth for what’s happening in your system. The principle: instrument everything. Log every authentication decision (success, failure, reason), every rate limit trigger, every routing decision. Emit metrics for gateway latency, backend latency, error rates by service. At Netflix, gateway metrics are the first place engineers look when debugging production issues because the gateway sees every request. Without this observability, the gateway becomes a black box that obscures problems rather than illuminating them.
Offloading Decision Framework
flowchart TB
Start(["Functionality to Consider"])
Q1{"Requires Database<br/>or Business Rules?"}
Q2{"Identical Across<br/>All Services?"}
Q3{"Adds Acceptable<br/>Latency (<10ms)?"}
Backend["Keep in Backend Service<br/><i>Examples: Authorization,<br/>Data Validation</i>"]
Gateway["Offload to Gateway<br/><i>Examples: SSL, Auth Token<br/>Validation, Rate Limiting</i>"]
Optimize["Optimize or Reconsider<br/><i>Cache results, use async,<br/>or keep in service</i>"]
Start --> Q1
Q1 -->|Yes| Backend
Q1 -->|No| Q2
Q2 -->|No| Backend
Q2 -->|Yes| Q3
Q3 -->|Yes| Gateway
Q3 -->|No| Optimize
Decision tree for determining whether functionality should be offloaded to the gateway or kept in backend services. The framework prioritizes business logic isolation, consistency across services, and latency impact to guide architectural decisions.
Deep Dive
Types / Variants
SSL/TLS Termination Offloading This is the most common form of gateway offloading. The gateway handles all SSL/TLS operations—certificate management, cryptographic handshakes, encryption/decryption. Backend services communicate over plain HTTP on a trusted internal network. When to use: Always, unless you have compliance requirements for end-to-end encryption (some healthcare or financial systems). Pros: Centralized certificate management (one place to rotate certificates), reduced CPU load on backend services (SSL is computationally expensive), simplified backend deployment (no certificate configuration). Cons: Requires secure internal network (use VPC or private subnets), potential compliance issues if data must be encrypted in transit everywhere. Example: Cloudflare terminates SSL at their edge, then routes requests to origin servers over HTTP or with a different certificate. This allows them to manage billions of certificates centrally while origin servers stay simple.
Authentication/Authorization Offloading The gateway validates authentication tokens (JWT, OAuth2, API keys) and optionally performs coarse-grained authorization (“Is this user allowed to access this service?”). Fine-grained authorization (“Can this user edit this specific resource?”) typically stays in backend services. When to use: When authentication logic is consistent across services and doesn’t require business context. Pros: Single authentication implementation (no code duplication), consistent security policy enforcement, easier to audit (all auth decisions in one place). Cons: Gateway needs access to user database or token validation service (adds latency), difficult to handle service-specific auth logic. Example: Auth0 and Okta integrate with API gateways to offload authentication. The gateway validates tokens, extracts user claims, and forwards them as headers. Backend services trust these headers because they come from the gateway over a secure internal network.
Rate Limiting Offloading The gateway enforces rate limits (“100 requests per minute per user”) without backend service involvement. This requires the gateway to track request counts per user/IP/API key. When to use: When rate limits are consistent across services or when you need to protect against DDoS at the edge. Pros: Prevents malicious traffic from reaching backend services (saves resources), consistent rate limiting policy, easier to adjust limits without redeploying services. Cons: Requires distributed state (Redis or similar) to track counts across gateway instances, can’t enforce business-logic-based limits (“free users get 100 requests, premium users get 1000”). Example: Stripe’s API gateway enforces rate limits at the edge. When a user exceeds their limit, the gateway returns 429 Too Many Requests without touching backend services. Rate limit state is stored in Redis with a sliding window algorithm.
Request/Response Transformation Offloading The gateway transforms requests between protocols (REST to gRPC, SOAP to REST) or formats (XML to JSON). It might also handle compression, header manipulation, or API versioning. When to use: When you need to support multiple client types (mobile apps want JSON, legacy systems need XML) or when migrating between protocols. Pros: Backend services use a single protocol internally, clients get their preferred format, easier to version APIs (gateway handles v1→v2 translation). Cons: Adds complexity to gateway, transformation logic can become a maintenance burden, increases latency. Example: Netflix’s Zuul gateway transforms mobile client requests (optimized for bandwidth) into multiple backend service calls (optimized for internal efficiency). The gateway aggregates responses and returns a single payload to the client.
Logging and Monitoring Offloading The gateway logs every request/response, capturing metadata like latency, status codes, user IDs, and error messages. This creates a centralized audit trail. When to use: Always—it’s low-cost and high-value. Pros: Single source of truth for API usage, easier to debug cross-service issues, compliance and audit requirements met in one place. Cons: High log volume (can be expensive to store), potential PII in logs (requires careful filtering). Example: Amazon API Gateway logs every request to CloudWatch, including request/response bodies (if enabled). This allows teams to debug production issues by searching logs without accessing individual service logs.
Gateway Offloading Variants Comparison
graph TB
subgraph SSL Termination
SSL_Gateway["Gateway<br/><i>Manages Certificates</i>"]
SSL_Backend["Backend Services<br/><i>Plain HTTP</i>"]
SSL_Gateway -."Decrypted Traffic".-> SSL_Backend
end
subgraph Authentication Offloading
Auth_Gateway["Gateway<br/><i>Validates JWT/OAuth</i>"]
Auth_Headers["Enriched Headers<br/><i>X-User-ID, X-Tenant-ID</i>"]
Auth_Backend["Backend Services<br/><i>Trust Headers</i>"]
Auth_Gateway -->|"Add Context"| Auth_Headers
Auth_Headers --> Auth_Backend
end
subgraph Rate Limiting Offloading
RL_Gateway["Gateway<br/><i>Enforces Limits</i>"]
RL_Redis[("Redis<br/><i>Counter State</i>")]
RL_Backend["Backend Services<br/><i>No Rate Limit Code</i>"]
RL_Gateway <-->|"Track Requests"| RL_Redis
RL_Gateway -."Allowed Traffic".-> RL_Backend
end
subgraph Protocol Translation
PT_Gateway["Gateway<br/><i>REST to gRPC</i>"]
PT_Mobile["Mobile Clients<br/><i>JSON/REST</i>"]
PT_Backend["Backend Services<br/><i>gRPC</i>"]
PT_Mobile -->|"HTTP/1.1"| PT_Gateway
PT_Gateway -->|"HTTP/2 gRPC"| PT_Backend
end
Four common gateway offloading variants showing different cross-cutting concerns moved to the gateway layer. Each variant simplifies backend services by centralizing infrastructure logic while maintaining clear separation from business logic.
Trade-offs
Centralization vs. Latency Offloading centralizes logic in the gateway, which adds latency to every request. Option A (Aggressive Offloading): Move as much as possible to the gateway—authentication, authorization, rate limiting, logging, transformation. This maximizes consistency and simplifies backend services but adds 10-20ms of latency per request. Option B (Minimal Offloading): Only offload SSL termination and basic routing. Keep authentication, rate limiting, and logging in backend services. This minimizes latency (2-5ms gateway overhead) but creates code duplication and inconsistent policies. Decision Framework: For latency-sensitive systems (trading platforms, real-time gaming), minimize offloading. For systems where consistency matters more than milliseconds (enterprise APIs, SaaS platforms), offload aggressively. Measure your P99 latency budget—if you have 100ms to work with, spending 15ms in the gateway is acceptable. If you have 10ms, you can’t afford much offloading.
Stateless vs. Stateful Gateway Option A (Stateless Gateway): The gateway doesn’t store any state—it validates tokens by calling an auth service, checks rate limits in Redis, and routes requests based on configuration. This enables horizontal scaling and fast recovery but adds latency for external calls. Option B (Stateful Gateway): The gateway caches authentication results, rate limit counters, and routing rules in local memory. This reduces latency (no external calls) but complicates scaling (state must be replicated) and recovery (state is lost on crash). Decision Framework: Start stateless for simplicity. Add caching (stateful) only when latency measurements show it’s necessary. Use short TTLs (5-60 seconds) to limit inconsistency. At scale, hybrid approaches work best—cache hot data (frequently accessed tokens) but fall back to external stores for cold data.
Single Gateway vs. Multiple Gateways Option A (Single Gateway): One gateway handles all traffic—external APIs, internal service-to-service calls, admin APIs. This maximizes code reuse and simplifies operations but creates a single point of failure and makes it hard to apply different policies (external traffic needs strict rate limiting, internal traffic doesn’t). Option B (Multiple Gateways): Separate gateways for different traffic types—an external API gateway, an internal service mesh gateway, an admin gateway. This allows tailored policies and reduces blast radius but increases operational complexity. Decision Framework: Start with a single gateway for simplicity. Split when you have different SLAs (external APIs need 99.99% uptime, internal APIs can tolerate more downtime) or different security requirements (admin APIs need VPN access, public APIs don’t). Netflix runs separate gateways for streaming traffic (ultra-low latency) and API traffic (more features, higher latency tolerance).
Gateway-Owned vs. Service-Owned Configuration Option A (Gateway-Owned): The gateway team controls all routing rules, rate limits, and authentication policies. Services register with the gateway and accept its decisions. This ensures consistency but creates a bottleneck (every change requires gateway team approval). Option B (Service-Owned): Services declare their own routing rules, rate limits, and auth requirements through annotations or config files. The gateway reads this configuration and applies it. This enables service autonomy but can lead to inconsistent policies. Decision Framework: Use service-owned configuration for routing and rate limits (services know their capacity). Use gateway-owned configuration for security policies (authentication, encryption) to prevent services from weakening security. At Uber, services declare their rate limits in a service registry, but the gateway team controls authentication policies centrally.
Stateless vs Stateful Gateway Architecture
graph TB
subgraph Stateless Gateway
SL_Client["Client"]
SL_Gateway["Gateway<br/><i>No Local State</i>"]
SL_Redis[("Redis<br/><i>Shared State</i>")]
SL_Auth["Auth Service<br/><i>Token Validation</i>"]
SL_Backend["Backend Service"]
SL_Client -->|"1. Request"| SL_Gateway
SL_Gateway -->|"2. Validate Token"| SL_Auth
SL_Gateway -->|"3. Check Rate Limit"| SL_Redis
SL_Gateway -->|"4. Forward"| SL_Backend
end
subgraph Stateful Gateway
SF_Client["Client"]
SF_Gateway["Gateway<br/><i>Local Cache</i>"]
SF_Cache["In-Memory<br/><i>Token Cache<br/>Rate Counters</i>"]
SF_Backend["Backend Service"]
SF_Client -->|"1. Request"| SF_Gateway
SF_Gateway <-->|"2. Check Cache<br/>(5ms)"| SF_Cache
SF_Gateway -->|"3. Forward"| SF_Backend
end
Comparison["Stateless: Higher Latency (10-15ms)<br/>Easy Scaling, Fast Recovery<br/><br/>Stateful: Lower Latency (5ms)<br/>Complex Scaling, State Loss Risk"]
Comparison of stateless and stateful gateway architectures. Stateless gateways query external services for every request, enabling easy horizontal scaling but adding latency. Stateful gateways cache results locally for lower latency but complicate scaling and recovery.
Common Pitfalls
Pitfall 1: Offloading Business Logic to the Gateway Teams start offloading infrastructure concerns (SSL, auth) but gradually add business logic—“Let’s add this data transformation,” “Let’s filter out invalid requests,” “Let’s aggregate these two service calls.” Soon the gateway becomes a monolithic application that’s hard to change and deploy. Why it happens: The gateway is convenient—it sees all traffic, so it’s tempting to add “just one more feature.” Product teams want to avoid deploying new services. How to avoid: Establish a clear policy: the gateway handles only protocol-level concerns (HTTP, TLS, routing). Business logic goes in services. If you’re tempted to add logic to the gateway, ask: “Would this logic be different for different services?” If yes, it’s business logic and belongs in a service. Netflix enforces this by having separate teams—the gateway team owns infrastructure, product teams own services. The gateway team rejects PRs that add business logic.
Pitfall 2: Creating a Gateway Bottleneck The gateway becomes a performance bottleneck because it’s doing too much—complex authentication, synchronous calls to external services, heavy request transformation. Every request slows down, and scaling the gateway doesn’t help because the bottleneck is per-request work, not throughput. Why it happens: Offloading is done without measuring latency impact. Teams add features (“Let’s call the fraud detection service from the gateway”) without considering the latency cost. How to avoid: Measure gateway latency continuously. Set a P99 latency budget (e.g., 10ms) and reject any feature that would exceed it. For expensive operations (fraud detection, complex authorization), use asynchronous patterns—the gateway forwards the request immediately and the backend service calls the fraud detection service. Use caching aggressively for authentication and rate limiting. At Stripe, the gateway’s P99 latency is monitored as a key metric, and any increase triggers an investigation.
Pitfall 3: Insufficient Gateway Availability The gateway is a single point of failure, but teams treat it like any other service—running a few instances, no multi-region deployment, no disaster recovery plan. When the gateway goes down, the entire system is unavailable. Why it happens: Teams underestimate the criticality of the gateway. It’s “just a proxy,” so it doesn’t get the same operational rigor as databases or core services. How to avoid: Treat the gateway as your most critical component. Run it in multiple availability zones (at minimum) or multiple regions (ideally). Use health checks and automatic failover. Have a disaster recovery plan—can you route traffic directly to backend services if the gateway fails? At Amazon, API Gateway runs in multiple regions with automatic DNS failover. If an entire region goes down, traffic routes to another region within seconds.
Pitfall 4: Inadequate Observability The gateway offloads authentication and rate limiting, but when a user reports “I’m getting 401 errors,” there’s no way to debug why. The gateway logs show “authentication failed,” but not why—was the token expired? Invalid signature? Wrong audience claim? Why it happens: Logging is added as an afterthought. Teams log success/failure but not the details needed for debugging. How to avoid: Log every decision with context. For authentication failures, log the token type, expiration time, signature validation result, and expected vs. actual audience. For rate limiting, log the current count, limit, and time window. Make logs searchable by user ID, request ID, and timestamp. At Uber, gateway logs include a request ID that’s propagated to all backend services, making it easy to trace a request through the entire system.
Pitfall 5: Tight Coupling Between Gateway and Backend Services The gateway knows too much about backend services—it has hardcoded service URLs, understands service-specific response formats, and makes assumptions about service behavior. When a backend service changes, the gateway breaks. Why it happens: Teams take shortcuts—hardcoding URLs instead of using service discovery, parsing service responses instead of treating them as opaque. How to avoid: Use service discovery (Consul, Eureka) so the gateway doesn’t need to know service locations. Treat backend responses as opaque—the gateway should forward them without parsing (except for error handling). Use standard protocols (HTTP status codes, standard headers) so the gateway doesn’t need service-specific logic. At Netflix, Zuul uses Eureka for service discovery and treats all backend services identically—it routes based on URL path but doesn’t understand service-specific details.
Math & Calculations
SSL/TLS Termination Capacity Planning
When offloading SSL termination to a gateway, you need to calculate the CPU capacity required for cryptographic operations. SSL handshakes are CPU-intensive, especially for RSA key exchanges.
Formula:
CPU cores needed = (Requests per second × Handshake percentage × CPU time per handshake) / CPU core capacity
Variables:
- Requests per second: Total incoming request rate
- Handshake percentage: Percentage of requests that require a new SSL handshake (vs. reusing existing connections). Typically 5-20% with connection reuse.
- CPU time per handshake: ~1-5ms for RSA-2048, ~0.5-1ms for ECDSA-256
- CPU core capacity: 1000ms per second per core
Worked Example: You’re designing a gateway for 100,000 requests per second. With connection reuse, 10% of requests require a new SSL handshake. You’re using RSA-2048 keys, which take 2ms of CPU time per handshake.
Handshakes per second = 100,000 × 0.10 = 10,000
Total CPU time needed = 10,000 × 2ms = 20,000ms = 20 CPU-seconds
CPU cores needed = 20 cores
With 50% headroom for traffic spikes: 30 CPU cores dedicated to SSL termination.
If you switch to ECDSA-256 keys (1ms per handshake), you’d only need 10 cores (15 with headroom). This is why modern systems prefer ECDSA—it’s 2-3x faster than RSA.
Rate Limiting State Size Calculation
When offloading rate limiting, the gateway needs to track request counts per user. This state is typically stored in Redis.
Formula:
Memory needed = Active users × Rate limit windows × Bytes per counter
Variables:
- Active users: Number of users making requests in the rate limit window
- Rate limit windows: Number of time windows tracked (e.g., per-minute and per-hour limits = 2 windows)
- Bytes per counter: ~100 bytes (user ID + timestamp + count + metadata)
Worked Example: You have 1 million active users per hour. You enforce both per-minute (100 requests) and per-hour (1000 requests) limits.
Memory needed = 1,000,000 users × 2 windows × 100 bytes
= 200,000,000 bytes
= 200 MB
With replication (3x for Redis cluster): 600 MB of Redis memory.
This is surprisingly small—rate limiting state is cheap. The bottleneck is usually Redis throughput (read/write operations per second), not memory.
Gateway Latency Budget
When offloading multiple concerns, latencies accumulate. You need to ensure the total gateway latency stays within your budget.
Formula:
Total gateway latency = SSL termination + Authentication + Rate limiting + Routing + Response processing
Worked Example: Your system has a 50ms end-to-end latency SLA. Backend services take 30ms on average. This leaves 20ms for the gateway.
SSL termination: 2ms (connection reuse, cached session)
Authentication: 5ms (JWT validation with cached public keys)
Rate limiting: 1ms (Redis lookup)
Routing: 1ms (in-memory routing table)
Response processing: 1ms (compression)
Total gateway latency = 2 + 5 + 1 + 1 + 1 = 10ms
You’re within budget (10ms < 20ms). If authentication took 15ms (e.g., calling an external auth service), you’d exceed your budget and need to optimize (cache auth results) or reduce offloading (move auth to backend services).
Real-World Examples
Netflix: Zuul Gateway for Streaming Traffic
Netflix’s Zuul gateway handles billions of requests per day from 200+ million subscribers across thousands of device types. Zuul offloads SSL termination, authentication, request logging, and dynamic routing. The interesting detail: Zuul uses “filters” that can be deployed independently of the gateway itself. When Netflix needs to add a new feature (e.g., A/B testing routing), they deploy a new filter without restarting the gateway. This allows rapid iteration while maintaining high availability.
Zuul offloads authentication by validating OAuth tokens and extracting user context (subscriber ID, device type, geographic region). Backend services receive this context as HTTP headers and trust it implicitly—they don’t re-validate tokens. This saved Netflix from implementing authentication logic in hundreds of microservices. Zuul also offloads request logging, capturing every API call with metadata like device type, app version, and network conditions. This data feeds into Netflix’s recommendation algorithms and operational dashboards.
The key architectural decision: Zuul doesn’t offload business logic. It doesn’t understand what a “movie” or “subscription plan” is. It handles infrastructure concerns (SSL, auth, routing) and delegates everything else to backend services. This keeps Zuul simple and allows backend teams to move independently.
Stripe: API Gateway for Payment Processing
Stripe’s API gateway offloads SSL termination, authentication (API key validation), rate limiting, and request logging for their payment APIs. Stripe processes millions of API requests per day from e-commerce platforms, marketplaces, and SaaS companies. The gateway enforces rate limits (100 requests per second for most customers, higher for enterprise) without backend service involvement. When a customer exceeds their limit, the gateway returns 429 Too Many Requests immediately, preventing malicious traffic from reaching payment processing services.
The interesting detail: Stripe’s gateway offloads idempotency key handling. Clients send an Idempotency-Key header to ensure duplicate requests (e.g., from network retries) don’t create duplicate charges. The gateway checks if it’s seen this idempotency key before—if yes, it returns the cached response without calling the backend. If no, it forwards the request and caches the response. This offloading prevents duplicate charges (a critical requirement for payment systems) without requiring every backend service to implement idempotency logic.
Stripe’s gateway also offloads webhook signature verification. When Stripe sends webhooks to customer servers, the gateway signs the payload with HMAC-SHA256. Customers verify this signature to ensure the webhook came from Stripe. By offloading signature generation to the gateway, Stripe ensures consistent security across all webhook events without requiring backend services to manage signing keys.
Uber: API Gateway for Rider and Driver Apps
Uber’s API gateway (built on Envoy) offloads SSL termination, authentication, rate limiting, and protocol translation for their mobile apps. The gateway handles requests from millions of riders and drivers worldwide, routing them to hundreds of backend microservices. The interesting detail: Uber’s gateway offloads protocol translation from HTTP/1.1 (used by mobile apps for compatibility) to gRPC (used internally for efficiency). Mobile apps send REST requests, the gateway translates them to gRPC, and backend services respond in gRPC. The gateway translates responses back to JSON for mobile apps.
This offloading allows Uber to optimize internal communication (gRPC is faster and more efficient than REST) while maintaining compatibility with mobile clients (many devices don’t support HTTP/2 or gRPC). The gateway also offloads request batching—mobile apps can send multiple requests in a single HTTP call, and the gateway fans them out to multiple backend services in parallel, then aggregates responses. This reduces mobile app latency and battery consumption.
Uber’s gateway runs in multiple regions with automatic failover. If the gateway in one region becomes unavailable, DNS routes traffic to another region within seconds. The gateway is designed to be stateless—it doesn’t cache authentication results or rate limit counters locally. Instead, it uses Redis for shared state, allowing any gateway instance to handle any request. This enables horizontal scaling and fast recovery from failures.
Netflix Zuul Gateway Architecture
graph LR
subgraph Client Layer
Mobile["Mobile Apps<br/><i>200M+ Users</i>"]
Web["Web Browsers<br/><i>Streaming UI</i>"]
TV["Smart TVs<br/><i>Various Devices</i>"]
end
subgraph Zuul Gateway Layer
LB["Load Balancer<br/><i>Multi-AZ</i>"]
Zuul1["Zuul Instance 1<br/><i>SSL, Auth, Routing</i>"]
Zuul2["Zuul Instance 2<br/><i>Dynamic Filters</i>"]
Zuul3["Zuul Instance 3<br/><i>Request Logging</i>"]
end
subgraph Backend Microservices
User["User Service<br/><i>Profiles</i>"]
Content["Content Service<br/><i>Catalog</i>"]
Playback["Playback Service<br/><i>Streaming</i>"]
Reco["Recommendation<br/><i>ML Models</i>"]
end
Mobile & Web & TV -->|"HTTPS"| LB
LB --> Zuul1 & Zuul2 & Zuul3
Zuul1 & Zuul2 & Zuul3 -->|"HTTP<br/>(Plain)"| User
Zuul1 & Zuul2 & Zuul3 -->|"HTTP<br/>(Plain)"| Content
Zuul1 & Zuul2 & Zuul3 -->|"HTTP<br/>(Plain)"| Playback
Zuul1 & Zuul2 & Zuul3 -->|"HTTP<br/>(Plain)"| Reco
Note["Offloaded: SSL Termination,<br/>OAuth Token Validation,<br/>Request Logging, Dynamic Routing<br/><br/>Not Offloaded: Business Logic,<br/>Content Authorization,<br/>Recommendation Algorithms"]
Netflix’s Zuul gateway architecture handling billions of requests from diverse client types. Zuul offloads SSL termination, OAuth validation, and request logging while using independently deployable filters for rapid feature iteration. Backend microservices receive simplified HTTP requests and focus purely on business logic.
Interview Expectations
Mid-Level
What You Should Know:
Explain what gateway offloading is and name 3-4 common offloaded concerns (SSL termination, authentication, rate limiting, logging). Describe why offloading is beneficial—reduces code duplication, ensures consistent policies, simplifies backend services. Walk through a basic request flow: client → gateway (SSL termination, auth validation) → backend service → gateway → client. Understand that the gateway becomes a single point of failure and needs high availability.
Bonus Points:
Discuss the tradeoff between centralization and latency. Mention that offloading adds latency (5-15ms typically) but provides operational benefits. Explain how to decide what to offload—infrastructure concerns (SSL, auth) vs. business logic (which stays in services). Reference a real-world example like Netflix’s Zuul or Amazon API Gateway. Discuss how to handle gateway failures (multiple instances, load balancing, health checks).
Example Question Response:
“Gateway offloading moves shared functionality like SSL termination and authentication from backend services to a centralized gateway. For example, instead of every microservice managing its own SSL certificates, the gateway handles all SSL operations and forwards plain HTTP requests to backend services. This simplifies backend services—they don’t need certificate management code—and ensures consistent security policies. The tradeoff is that the gateway becomes critical infrastructure, so we need to run multiple instances for high availability. I’d offload SSL, authentication, and rate limiting but keep business logic in services.”
Senior
What You Should Know:
Everything from mid-level, plus: Discuss operational implications of offloading—certificate rotation, gateway deployment strategies, monitoring and alerting. Explain how to measure the latency impact of offloading and when to optimize (caching, connection pooling). Describe different offloading strategies (aggressive vs. minimal) and when to use each. Understand the difference between stateless and stateful gateways and the tradeoffs. Discuss how to prevent the gateway from becoming a bottleneck (horizontal scaling, avoiding synchronous external calls, caching).
Bonus Points:
Design a gateway architecture for a specific scale (e.g., 100K requests/second). Calculate the CPU capacity needed for SSL termination and the memory needed for rate limiting state. Discuss advanced patterns like protocol translation (REST to gRPC), request batching, and response aggregation. Explain how to handle service-specific requirements (some services need different auth, some need to bypass rate limiting). Reference multiple real-world examples and explain their architectural decisions (why Netflix uses filters, why Stripe offloads idempotency).
Example Question Response:
“For a system handling 100K requests/second, I’d offload SSL termination, authentication, and rate limiting to the gateway. SSL termination with RSA-2048 keys requires about 20 CPU cores (assuming 10% handshake rate and 2ms per handshake). I’d use ECDSA keys instead to cut that in half. For authentication, I’d validate JWTs at the gateway and cache the validation results for 5 minutes to avoid hitting the auth service on every request. Rate limiting state would be stored in Redis—with 1M active users and per-minute/per-hour limits, we’d need about 600MB of Redis memory with replication. The gateway would run in multiple availability zones with automatic failover. I’d measure P99 latency continuously and set a budget of 10ms for gateway operations. If we exceed that, I’d optimize by caching more aggressively or moving some offloading back to services.”
Staff+
What You Should Know:
Everything from senior, plus: Discuss the organizational implications of gateway offloading—who owns the gateway, how do service teams interact with it, how do you prevent the gateway from becoming a bottleneck for product development. Explain how to evolve the gateway architecture over time (starting simple, adding features, splitting into multiple gateways). Discuss the security implications—what happens if the gateway is compromised, how do you ensure backend services can trust gateway-provided headers. Understand when NOT to offload (latency-sensitive operations, service-specific logic) and how to provide escape hatches.
Distinguishing Signals:
Propose a governance model for gateway configuration (who can change routing rules, rate limits, auth policies). Discuss how to measure the ROI of offloading—how much engineering time is saved by not implementing auth in every service, how much operational complexity is reduced. Explain how to handle multi-region deployments (does each region have its own gateway, how do you handle cross-region routing). Discuss the evolution path from a monolithic gateway to a service mesh (when does it make sense to move from centralized gateway to distributed proxies). Reference industry trends (the shift from API gateways to service meshes, the rise of WebAssembly for gateway extensibility).
Example Question Response:
“Gateway offloading is a forcing function for organizational clarity. You need to decide: what’s infrastructure (owned by the platform team) vs. what’s business logic (owned by product teams). At scale, I’d establish a governance model where the gateway team owns security policies (authentication, encryption) but service teams own routing rules and rate limits through self-service configuration. This prevents the gateway from becoming a bottleneck for product development while maintaining security consistency. For a global system, I’d run gateways in each region with local rate limiting and authentication caching, but centralized policy management. The evolution path is: start with a single gateway for simplicity, split into multiple gateways when you have different SLAs or security requirements (external vs. internal traffic), and eventually move to a service mesh when you need more granular control. The key decision point is when the operational complexity of a centralized gateway exceeds the complexity of distributed proxies—typically around 100+ services or when you need per-service policies that can’t be expressed in gateway configuration.”
Common Interview Questions
Question 1: What functionality should be offloaded to the gateway vs. kept in backend services?
60-second answer: Offload infrastructure concerns that are identical across services: SSL termination, authentication token validation, rate limiting, request logging, and protocol translation. Keep business logic in services: authorization rules that require business context, data validation, and service-specific transformations. The decision framework: if it requires database queries or business rules, it stays in services. If it’s purely technical (cryptography, compression), it goes in the gateway.
2-minute answer: Start by categorizing functionality into three buckets: (1) Pure infrastructure—SSL, compression, protocol handling. Always offload these. (2) Shared cross-cutting concerns—authentication, rate limiting, logging. Offload these if they’re truly consistent across services. (3) Business logic—authorization, validation, data transformation. Never offload these. The nuance is in category 2. Authentication token validation (“Is this JWT valid?”) can be offloaded, but authorization (“Can user X access resource Y?”) usually can’t because it requires business context. Rate limiting can be offloaded for simple policies (“100 requests per minute”) but not for complex ones (“Free users get 100, premium users get 1000, unless they’re in a trial”). The key is to offload only what provides clear value without adding complexity. At Stripe, we offloaded authentication and idempotency key handling but kept fine-grained permissions in services because permission logic varies by API endpoint.
Red flags: Saying “offload everything to simplify services” (this creates a monolithic gateway). Not considering latency impact (every offloaded operation adds latency). Offloading business logic (this couples the gateway to service implementations).
Question 2: How do you prevent the gateway from becoming a single point of failure?
60-second answer: Run multiple gateway instances behind a load balancer, ensure stateless operation (no session affinity), implement health checks and automatic failover, and deploy across multiple availability zones. The gateway should be horizontally scalable—adding more instances increases capacity. Use service discovery so the gateway doesn’t have hardcoded backend service locations. Monitor gateway health continuously and have a disaster recovery plan.
2-minute answer: The gateway is critical infrastructure, so it needs the highest availability standards. First, run multiple instances (at least 3) behind a load balancer with health checks. If an instance fails, traffic immediately routes to healthy instances. Second, make the gateway stateless—it shouldn’t store session data or cache authentication results locally (use Redis for shared state). This enables horizontal scaling and fast recovery. Third, deploy across multiple availability zones or regions. At Amazon, API Gateway runs in multiple regions with automatic DNS failover—if an entire region goes down, traffic routes to another region within seconds. Fourth, have a disaster recovery plan. Can you route traffic directly to backend services if the gateway fails? This might mean exposing backend services publicly (with their own SSL certificates) as a fallback. Fifth, monitor gateway health obsessively—track P99 latency, error rates, and throughput. Set up alerts for any degradation. The goal is to detect and recover from failures before users notice.
Red flags: Saying “run two instances for redundancy” (two isn’t enough—you need N+2 for maintenance and failures). Not considering multi-region deployment (a single region is still a single point of failure). Making the gateway stateful (this complicates scaling and recovery).
Question 3: How do you handle the latency impact of gateway offloading?
60-second answer: Measure the latency of each offloaded operation (SSL termination, authentication, rate limiting) and ensure the total stays within your budget. Use caching aggressively—cache authentication results, rate limit counters, and routing rules. Avoid synchronous external calls from the gateway (e.g., calling an external auth service on every request). Use connection pooling to backend services to avoid connection setup overhead. Monitor P99 latency continuously and optimize when it exceeds your budget.
2-minute answer: Start by establishing a latency budget. If your end-to-end SLA is 100ms and backend services take 70ms, you have 30ms for the gateway. Measure each offloaded operation: SSL termination (1-5ms with connection reuse), authentication (5-10ms if calling an auth service, 1ms if cached), rate limiting (1-2ms with Redis), routing (1ms). If the total exceeds your budget, optimize. For authentication, cache validation results—if you’ve validated a JWT in the last 5 minutes, trust it without re-validating. For rate limiting, use local counters with periodic sync to Redis instead of hitting Redis on every request. For SSL, use connection reuse and session resumption to avoid expensive handshakes. Avoid synchronous external calls—if you need to call a fraud detection service, do it asynchronously (forward the request immediately, let the backend service call fraud detection). At Twitter, the API gateway’s P99 latency is under 10ms because they cache aggressively and avoid external calls. The key is to measure continuously—latency can degrade over time as you add features, so you need monitoring and alerts.
Red flags: Not measuring latency impact (“it’s just a few milliseconds”). Making synchronous external calls from the gateway (this adds unpredictable latency). Not using caching (this forces expensive operations on every request).
Question 4: How do you handle service-specific requirements in a centralized gateway?
60-second answer: Provide escape hatches—allow services to opt out of offloaded functionality through configuration. For example, health check endpoints might bypass authentication, webhook receivers might need raw request bodies without decompression. Use service metadata or annotations to declare these requirements. The gateway reads this configuration and applies service-specific policies. The default is to offload, but services can opt out when needed.
2-minute answer: A centralized gateway risks becoming a rigid constraint that forces workarounds. The solution is to make offloading configurable per service or per endpoint. At Amazon, services mark specific endpoints as “bypass-auth” or “bypass-rate-limit” in their service registry. The gateway reads this metadata and applies the appropriate policy. For example, a health check endpoint might be marked “bypass-auth” because it needs to respond even when the auth service is down. A webhook receiver might be marked “no-decompression” because it needs to verify HMAC signatures on the raw request body. The key is to provide these escape hatches without creating chaos—you need governance. At Uber, service teams can configure their own rate limits and routing rules, but the gateway team controls authentication policies centrally. This balances autonomy (services can move fast) with consistency (security policies are uniform). The implementation is typically through a service registry (Consul, Eureka) or a configuration service (etcd, ZooKeeper) where services declare their requirements. The gateway watches for changes and updates its configuration dynamically.
Red flags: Saying “the gateway applies the same policy to all services” (this forces workarounds). Allowing services to weaken security policies (e.g., disabling authentication). Not having governance around who can change gateway configuration.
Question 5: When would you choose NOT to use gateway offloading?
60-second answer: Don’t offload when latency is critical (ultra-low latency systems like trading platforms), when you have compliance requirements for end-to-end encryption (some healthcare/financial systems), or when the offloaded functionality is service-specific (complex authorization rules). Also avoid offloading if you have a small number of services (the operational overhead isn’t worth it) or if your services are already deployed and working well (don’t fix what isn’t broken).
2-minute answer: Gateway offloading has costs—added latency, operational complexity, and a single point of failure. It’s not always the right choice. First, latency-sensitive systems: if you’re building a trading platform where every millisecond matters, you can’t afford 10-15ms of gateway overhead. In this case, keep SSL termination and authentication in services, even if it means code duplication. Second, compliance requirements: some industries require end-to-end encryption, meaning data must be encrypted from client to backend service. You can’t terminate SSL at the gateway. Third, service-specific logic: if authentication or authorization varies significantly between services, offloading becomes complex. It’s simpler to keep it in services. Fourth, small scale: if you have 5 services, the operational overhead of running a highly available gateway isn’t worth it. Just implement SSL and auth in each service. Fifth, existing systems: if your services are already deployed and working well, don’t add a gateway just for the sake of it. The migration cost (deploying the gateway, moving functionality, testing) might not be worth the benefits. The decision framework: offload when you have many services (10+), consistent cross-cutting concerns, and a latency budget that can accommodate gateway overhead. Don’t offload when latency is critical, requirements are service-specific, or scale is small.
Red flags: Saying “always use gateway offloading” (it’s not always the right choice). Not considering the migration cost for existing systems. Not discussing the latency vs. consistency tradeoff.
Red Flags to Avoid
Red Flag 1: “Gateway offloading means moving all logic to the gateway”
Why it’s wrong: This creates a monolithic gateway that’s hard to change and deploy. The gateway should handle only infrastructure concerns (SSL, auth, routing), not business logic. If the gateway understands your domain model (users, orders, payments), you’ve gone too far.
What to say instead: “Gateway offloading is specifically for shared infrastructure concerns like SSL termination, authentication token validation, and rate limiting. Business logic—authorization rules, data validation, service-specific transformations—stays in backend services. The gateway should be protocol-aware but domain-agnostic. If I’m tempted to add logic to the gateway, I ask: ‘Would this logic be different for different services?’ If yes, it’s business logic and belongs in a service.”
Red Flag 2: “The gateway should cache everything to reduce latency”
Why it’s wrong: Caching creates statefulness, which complicates scaling and recovery. Cached data can become stale, leading to inconsistencies (e.g., a revoked token is still accepted because it’s cached). Caching also increases memory usage and complexity.
What to say instead: “Caching should be used selectively with short TTLs. I’d cache authentication validation results (5-minute TTL) and rate limit counters (local cache with periodic sync to Redis), but not routing rules (which should come from service discovery) or user data (which changes frequently). The key is to balance latency reduction with consistency. For critical operations like authentication, I’d prefer a slight latency increase over the risk of accepting a revoked token. The decision framework: cache only when measurements show it’s necessary, use short TTLs to limit inconsistency, and have a fallback to the source of truth.”
Red Flag 3: “We don’t need multiple gateway instances because the gateway is simple”
Why it’s wrong: The gateway is a single point of failure regardless of its complexity. If it goes down, your entire system is unavailable. Even a simple gateway needs high availability because it’s critical infrastructure.
What to say instead: “The gateway is the most critical component in the system because it’s the single entry point for all traffic. Even if it’s simple, it needs the highest availability standards. I’d run at least 3 instances across multiple availability zones with automatic failover. For a global system, I’d deploy in multiple regions with DNS-based routing. The goal is to ensure that no single failure—instance crash, availability zone outage, even region outage—makes the system unavailable. Simplicity doesn’t reduce criticality; it just makes the gateway easier to operate.”
Red Flag 4: “SSL termination at the gateway is insecure because traffic is unencrypted internally”
Why it’s wrong: This misunderstands the threat model. SSL termination at the gateway is secure if your internal network is trusted (VPC, private subnets). The threat you’re protecting against is external attackers intercepting traffic over the public internet, not internal attackers on your private network. If you don’t trust your internal network, you have bigger problems than SSL termination.
What to say instead: “SSL termination at the gateway is secure when combined with a trusted internal network. The gateway terminates SSL from the public internet, then forwards requests over HTTP on a private network (VPC) that’s not accessible externally. This is the standard pattern at companies like Netflix, Amazon, and Google. If you have compliance requirements for end-to-end encryption (e.g., healthcare, finance), you can use mutual TLS (mTLS) between the gateway and backend services, but this adds operational complexity (certificate management for every service). The decision depends on your threat model and compliance requirements, not on a blanket ‘SSL termination is insecure’ statement.”
Red Flag 5: “We should offload database queries to the gateway to reduce backend service load”
Why it’s wrong: This is business logic, not infrastructure. The gateway shouldn’t understand your data model or make database queries. This creates tight coupling between the gateway and your database schema, making both harder to change.
What to say instead: “Database queries are business logic and should stay in backend services. The gateway should be stateless and domain-agnostic—it shouldn’t know about your database schema or business entities. If you’re trying to reduce backend service load, the solution is to scale backend services horizontally or optimize their queries, not to move logic to the gateway. The gateway’s job is to route requests to the right service, not to execute business logic. If I need to reduce load, I’d add caching in backend services or use a CDN for static content, but I wouldn’t move queries to the gateway.”
Key Takeaways
-
Gateway Offloading centralizes shared infrastructure concerns (SSL termination, authentication, rate limiting, logging) in a gateway proxy, eliminating code duplication across backend services and ensuring consistent policy enforcement. The pattern emerged from microservices architectures where managing hundreds of services made duplication untenable.
-
Offload infrastructure, not business logic. SSL termination, authentication token validation, and request logging are perfect candidates because they’re identical across services. Service-specific authorization, data validation, and transformations stay in backend services. The decision framework: if it requires database queries or business rules, it’s not offloadable.
-
The gateway becomes critical infrastructure requiring high availability. Run multiple instances across availability zones with automatic failover, ensure stateless operation (use Redis for shared state), and monitor P99 latency continuously. At scale, deploy in multiple regions with DNS-based routing. The gateway is a single point of failure—design accordingly.
-
Measure and optimize latency impact. Each offloaded operation adds latency: SSL termination (1-5ms), authentication (5-10ms), rate limiting (1-2ms). Use caching (authentication results, rate limit counters) with short TTLs, avoid synchronous external calls, and set a latency budget (typically 10-20ms for gateway operations). If you exceed your budget, move functionality back to services.
-
Real-world implementations balance consistency and flexibility. Netflix’s Zuul offloads SSL, authentication, and routing but uses independently deployable filters for rapid iteration. Stripe offloads idempotency key handling to prevent duplicate charges. Uber offloads protocol translation (REST to gRPC) to optimize internal communication while maintaining client compatibility. The pattern is proven at massive scale but requires careful operational design.
Related Topics
Prerequisites: Understanding these topics will help you grasp gateway offloading more deeply:
- API Gateway - Gateway offloading is typically implemented in an API gateway; understand the broader gateway pattern first
- Load Balancing - Gateways sit behind load balancers and distribute traffic to backend services
- SSL/TLS - SSL termination is the most common offloaded operation; understand the cryptographic handshake
- Authentication & Authorization - Offloading auth requires understanding token validation, JWT, and OAuth2
Related Patterns: These patterns complement or contrast with gateway offloading:
- Backend for Frontend (BFF) - BFF is client-specific aggregation; gateway offloading is shared infrastructure
- Service Mesh - Service mesh distributes offloaded functionality to sidecars instead of centralizing in a gateway
- Sidecar Pattern - Alternative to centralized offloading; each service gets its own proxy
- Strangler Fig Pattern - Useful when migrating to gateway offloading from existing services
Next Steps: After mastering gateway offloading, explore:
- Rate Limiting - Deep dive into rate limiting algorithms and distributed rate limiting
- Circuit Breaker - Often implemented in gateways to prevent cascading failures
- Caching Strategies - Gateway caching for authentication and rate limiting
- Observability - Monitoring and debugging gateway operations