APIGatewayCost.com

Updated 17 April 2026

API Gateway vs Load Balancer: Cost, Features, and When to Use Which (2026)

One of the most common architecture decisions for AWS engineers: should you put API Gateway or an Application Load Balancer in front of your services? The cost crossover point is approximately 500k requests per day. Here is the full cost breakdown, feature comparison, and a decision framework that actually helps you choose.

Quick Verdict

Under 500k requests/day, API Gateway is cheaper because it scales to zero. Above 500k/day with steady, predictable traffic, ALB wins on per-request cost. For public APIs needing auth, rate limiting, and caching, API Gateway is almost always the better architecture regardless of cost. For internal high-volume service-to-service traffic where auth is handled downstream, ALB wins decisively.

The Fundamental Pricing Difference

API Gateway (HTTP API)

$1.00/million requests

Pure consumption pricing. No baseline charge. If you have zero traffic, you pay zero. Scales instantly from 0 to millions of requests. No instance capacity to manage. Includes: JWT auth, rate limiting, routing. Data transfer charged separately ($0.09/GB outbound).

Minimum monthly cost: $0.00

At 500k req/day (15M/month): ~$15/month

Application Load Balancer (ALB)

$0.0225/hour + LCU

Hybrid pricing: hourly baseline plus Load Capacity Unit (LCU) consumption charges. LCUs measure the max of: new connections per second, active connections, processed bytes per hour, or rule evaluations per second. Even at zero traffic, you pay the hourly charge. At volume, per-request cost drops significantly below API Gateway.

Minimum monthly cost: $16.43/month (720 hours)

At 500k req/day (15M/month): ~$25/month

Cost Comparison by Traffic Volume

The table below models AWS HTTP API vs ALB for REST traffic. ALB LCU costs are estimated using the processed-bytes dimension (dominant at API traffic patterns with 4 KB avg payload). Real-world costs vary based on your LCU profile.

Daily/Monthly trafficAPI Gateway (HTTP)ALBWinnerNotes
100k req/day (3M/month)~$3/month~$20/monthAPI GatewayALB minimum charge dominates at low volume
300k req/day (9M/month)~$9/month~$22/monthAPI GatewayALB LCU costs still dominated by hourly baseline
500k req/day (15M/month)~$15/month~$25/monthRoughly tiedCrossover zone - feature needs should decide
1M req/day (30M/month)~$30/month~$28/monthALBALB per-request cost now below API Gateway
5M req/day (150M/month)~$150/month~$40/monthALBALB is 73% cheaper at this volume
20M req/day (600M/month)~$564/month~$70/monthALBALB advantage widens significantly at high volume

ALB pricing: $0.0225/hour ($16.43/month base) + $0.008/LCU-hour. API Gateway HTTP pricing: $1.00/million for first 300M. Data transfer excluded from both for comparability. Source: aws.amazon.com pricing pages, April 2026.

Feature Comparison: Where API Gateway Wins on Capability

Cost is only part of the equation. API Gateway and ALB have genuinely different feature sets. An ALB that requires $500/month in custom engineering to replace what API Gateway provides natively is not actually cheaper.

FeatureAPI Gateway (HTTP)ALB
JWT / OAuth authenticationNative, built-inNot supported natively (add Cognito)
API key managementYes (REST API only, not HTTP)No
Per-client rate limitingYes (usage plans, REST API)No
Request throttlingYes (10k req/sec default)No (capacity scales, no throttle)
Response cachingYes (REST API, $0.028/GB/hr)No
Request transformationYes (REST API VTL templates)No
URL path routingYesYes (path-based routing rules)
Host-based routingYes (custom domains)Yes (SNI + host headers)
Health checksVia Lambda/backendYes (native, TCP + HTTP)
WebSocket supportYes (REST API, $0.25/M conn-min)Yes (sticky sessions)
gRPCNo native supportYes (HTTP/2 native)
AWS WAF integrationYes (add-on)Yes (add-on, same pricing)
Lambda integrationNative (no VPC required)Yes (Lambda targets, requires VPC)
ECS / EC2 targetsVia VPC link (REST) or HTTP integrationNative target groups
Minimum monthly cost$0 (pay per request)$16.43 (hourly baseline)

Decision Framework: Which to Choose

Use API Gateway when

  • Traffic is bursty or low-volume (scales to zero, no baseline cost)
  • You need JWT/OAuth auth at the edge without writing auth code
  • You are exposing APIs to external developers with API keys and rate limits
  • Backend is Lambda - API Gateway is the native, lowest-latency pair
  • You want managed rate limiting without custom code or WAF rules
  • You need response caching to reduce backend Lambda invocations

Use ALB when

  • High-volume steady traffic (1M+ requests/day) with predictable patterns
  • Internal service-to-service routing where auth happens downstream
  • gRPC workloads (ALB has native HTTP/2 + gRPC support)
  • Backend is ECS, EC2, or container fleet needing native health checks
  • Low-latency priority (ALB adds 1-5ms vs API Gateway 10-100ms)
  • Cost is primary constraint and you can handle auth/rate-limiting in code

Using Both Together: The Hybrid Architecture

Many production systems use API Gateway and ALB together. The pattern is: API Gateway at the public edge, ALB inside the VPC for routing to a compute fleet. This gives you the best of both worlds: API Gateway handles auth, rate limiting, and external-facing API management; ALB handles efficient internal routing, health checks, and gRPC.

Layer 1: Cloudflare or CDN (optional)

DDoS protection, edge caching, WAF. Handles 60-80% of traffic at the edge for read-heavy APIs.

Layer 2: API Gateway (HTTP API)

JWT validation, rate limiting per client, routing rules. Forwards only authenticated, non-rate-limited requests inward.

Layer 3: ALB (inside VPC)

Routes to ECS services or EC2 instances. Target group health checks. gRPC support for internal service calls.

Layer 4: Your services (ECS, Lambda, EC2)

Business logic. Auth already handled at layer 2; services focus on computation.

This pattern is particularly common in regulated industries (finance, healthcare) where auth must occur before compute is invoked, and where internal service-to-service traffic volume justifies ALB's efficiency. The additional API Gateway cost is offset by the security and compliance value.

Startup Cost Journey: A Worked Timeline

Month 1-6: Early stage (50k req/day, 1.5M/month)

~$2/month

Decision: API Gateway HTTP API

Scales to zero. No baseline cost. Lambda integration is native. $2/month for JWT auth and rate limiting is a good deal.

Month 7-12: Growth (300k req/day, 9M/month)

~$9/month

Decision: API Gateway HTTP API

Still cheaper than ALB ($22/month). No reason to switch. Focus on product, not infrastructure.

Month 13-18: Scale (1M req/day, 30M/month)

API GW: ~$30/month + ALB: ~$28/month = ~$58/month

Decision: Evaluate ALB behind API Gateway

ALB now cheaper per-request for the compute-routing layer. Add ALB behind API Gateway for ECS fleet. API Gateway stays at the auth/rate-limit edge.

Month 19-24: High traffic (10M req/day, 300M/month)

~$200-400/month total

Decision: Split architecture: Cloudflare edge + ALB internal

At this scale, replace API Gateway with Cloudflare Workers at the edge (zero egress, WAF included) and ALB for internal routing. Major cost reduction vs API Gateway alone ($300+/month).

Non-AWS Equivalents

Azure

Azure API Management (APIM) is the API Gateway equivalent. Azure Application Gateway is the ALB equivalent (L7). Azure Load Balancer is the NLB equivalent (L4). APIM Consumption tier is pure pay-per-call (similar to AWS HTTP API). Standard APIM is hourly (similar to ALB). See Azure APIM pricing.

Google Cloud

Apigee X is the API Gateway equivalent. Google Cloud Load Balancing (HTTP(S) LB) is the ALB equivalent. Cloud Load Balancing has no per-request fee for global HTTP LB - you pay per-rule per-month. At high volume, GCP Load Balancing can be cheaper than both AWS API GW and AWS ALB.

Cloudflare (replaces both)

Cloudflare Workers effectively replaces both roles. Workers handles auth, routing, rate limiting, and transformation at the edge (API Gateway role) with zero-egress data transfer and no per-instance cost (load balancer role). For many teams, moving to Cloudflare Workers eliminates the need to choose between API GW and ALB. See Cloudflare pricing.

Kong + ALB pattern

Kong Gateway OSS or Konnect deployed on EC2/ECS, with an ALB in front. Kong handles all API management features; ALB provides health checks, SSL termination, and Kong instance routing. Common in multi-cloud environments where Kong's portability is valued. See Kong pricing and self-hosted cost analysis.

Frequently Asked Questions

Is API Gateway cheaper than ALB?+
It depends on traffic volume. At low volumes (under 500k requests/day), API Gateway is cheaper because it scales to zero - you pay nothing with no traffic. AWS HTTP API at 3M requests/month costs roughly $3. ALB has a minimum cost of $16.43/month regardless of traffic (the hourly fee). Above 500k-1M requests/day with steady traffic, ALB's per-request cost drops significantly below API Gateway. At 5M requests/day (150M/month), AWS HTTP API costs $150; ALB costs roughly $35-45.
Can I replace API Gateway with ALB?+
Technically yes, but you lose significant functionality. ALB handles L7 routing and load balancing. It does not do: JWT authentication, API key validation, per-client rate limiting, request/response transformation, response caching, or usage plans. If you replace API Gateway with ALB, you need to implement all of these in your application code or add separate services (Cognito, WAF, ElastiCache). The engineering cost is usually not worth the request-fee savings unless you are running hundreds of millions of requests per day.
Which is faster - API Gateway or ALB?+
ALB is generally faster for raw request proxying because it adds less processing overhead. API Gateway's REST API adds 50-100ms of latency for authorization and transformation features. HTTP API adds 10-30ms. ALB typically adds 1-5ms for pure L7 routing. For latency-critical high-volume services where you handle auth downstream, ALB is the better choice. For public APIs with complex auth and rate limiting requirements, API Gateway's added latency is the trade-off for avoiding building auth infrastructure yourself.
Do I need both API Gateway and ALB?+
Many production architectures use both. A common pattern: API Gateway (HTTP API) at the edge handles JWT validation, rate limiting, and routing. Behind it, an ALB distributes traffic across an ECS or EC2 fleet. API Gateway terminates the auth challenge at the edge (preventing unauth'd requests from hitting your compute); ALB handles efficient traffic distribution inside your VPC. This hybrid approach is especially common for regulated industries where auth must happen before any compute is invoked.
What about Network Load Balancer (NLB) instead of ALB?+
NLB operates at Layer 4 (TCP/UDP) rather than Layer 7 (HTTP). It is faster and cheaper for raw TCP throughput but cannot inspect HTTP headers, route based on URL paths, or handle SSL termination at the application layer. NLB is the right choice for non-HTTP workloads (database connections, game servers, streaming) or when you need ultra-low latency at the TCP level. For REST API traffic, ALB is the correct comparison point, not NLB.
ALB pricing: $0.0225/hour + $0.008/LCU-hour. API Gateway HTTP pricing: $1.00/million requests. All figures from aws.amazon.com pricing pages, April 2026. Cost crossover varies with LCU profile and payload size. Not affiliated with AWS. See also: AWS API Gateway pricing, full provider comparison, cost optimization guide.