Reference architecture for 100M requests/day

Clients (Web/Mobile)

CDN

WAF + API Gateway

Load Balancer

Stateless API Service

Redis Cache (Cache-Aside)

Read Replicas (Queries)

Primary DB (Commands)

Message Queue

Async Workers

Metrics/Tracing/Logs

This diagram shows a scalable request path with edge caching, stateless services, cache-aside reads, separated read/write data paths, and asynchronous workers for burst handling.

Handling 100 million requests per day is less about a single “big server” and more about designing a resilient, scalable flow where each layer does one job well. At this scale, even small inefficiencies become expensive, and small outages become visible quickly. The good news: with the right architecture and patterns, 100 million requests/day is very achievable on modern cloud infrastructure. In this guide, we’ll walk through the practical steps, from traffic math and bottleneck planning to specific patterns such as cache-aside, load balancing, queue-based load leveling, and CQRS, all with easy-to-understand examples.

# 1) Understand the target load before choosing architecture

Before discussing services and databases, convert business goals into engineering numbers.

# Quick capacity math

100 million requests/day means:

  • Average RPS: 100,000,000 / 86,400 ≈ 1,157 requests/second
  • Peak RPS: Usually 3x to 10x average depending on usage patterns
  • With a 5x burst assumption, design for ~5,000–6,000 RPS safely

Also define non-functional requirements:

  • Latency target (for example, p95 < 200 ms)
  • Availability target (99.9%, 99.95%, or higher)
  • Durability (how much data loss is acceptable, if any)
  • Consistency expectations (strong vs eventual consistency)

Tip: Most failed large-scale systems don’t fail from average load; they fail during spikes, retries, and cascading timeouts.

# Simple real-world analogy

Think of a stadium exit after a match. If everyone leaves at once, gates clog. Good design creates multiple exits, staging areas, and traffic signals. System design works the same way: distribute entry points, absorb bursts, and keep critical lanes clear.

# 2) Core architecture to serve 100 million requests/day

A robust baseline architecture looks like this: CDN → WAF/API Gateway → Load Balancer → Stateless App Tier → Cache + Database + Queue + Worker services. Each layer protects and accelerates the next.

# Key building blocks and why they matter

  • CDN: Offloads static content and edge-caches frequent responses.
  • WAF + API Gateway: Security filtering, rate limiting, authentication, routing.
  • Load Balancer: Spreads traffic across healthy instances.
  • Stateless services: Easy horizontal scaling; no sticky session dependency.
  • Redis/Memcached: Millisecond reads for hot data; major DB load reduction.
  • Database (replicas/shards): Reliable persistence with read scaling.
  • Message queue: Smooths spikes and decouples slow tasks.

# Example flow: product details API

  1. User requests /products/123.
  2. Gateway validates token + checks rate limit.
  3. App checks Redis cache for product payload.
  4. If miss, read from DB read replica, return response, write to cache.
  5. Background event (view analytics) pushed to queue for async processing.
function getProduct(productId, userToken):
  validateToken(userToken)
  enforceRateLimit(userToken)

  key = "product:" + productId
  cached = redis.get(key)
  if cached:
    return cached

  data = dbReplica.query("SELECT * FROM products WHERE id = ?", productId)
  redis.setex(key, ttl=120, value=data)

  queue.publish("product_viewed", { productId, ts: now() })
  return data

# 3) System design patterns to use (with easy examples)

If you ask, “Which system design pattern should I use?”, the practical answer is: use a combination based on bottlenecks. For 100 million requests/day, these patterns are especially effective.

# A) Cache-Aside Pattern (most common)

What: Application checks cache first, then DB on miss, then fills cache.

Why: Reduces read pressure and latency dramatically.

Example: News homepage where many users request identical sections every minute.

# B) Queue-Based Load Leveling

What: Put non-critical or slow work in a queue and process asynchronously.

Why: Prevents user-facing APIs from slowing under bursts.

Example: Order placement returns quickly; invoice email and analytics run in workers.

# C) CQRS (Command Query Responsibility Segregation)

What: Separate write and read models/services.

Why: Read-heavy systems scale independently from writes.

Example: Social feed: writes go to event stream; reads hit optimized feed store.

# D) Bulkhead + Circuit Breaker

What: Isolate resource pools and cut off failing dependencies temporarily.

Why: Stops cascading failures when one downstream system is unhealthy.

Example: If recommendations service is down, show default recommendations instead of failing page loads.

response = circuitBreaker.call("recommendation-service", timeout=80ms)
if response.failed:
  return defaultRecommendations()
return response.data

Key takeaway: For 100 million requests/day, the best pattern “combo” is usually Cache-Aside + Queue-Based Load Leveling + Circuit Breakers, with CQRS added for strongly read-heavy products.

# 4) Data layer strategy: replication, partitioning, and consistency

At high scale, database design is often the true limiter.

# Read scaling with replicas

  • Primary handles writes.
  • Replicas serve reads.
  • Useful when read/write ratio is high (for example, 90/10).

# Horizontal partitioning (sharding)

When a single DB node cannot handle volume, split data by shard key (e.g., user_id range or hash). This distributes storage and throughput.

-- Logical routing example
-- shard_id = hash(user_id) % 16
SELECT * FROM user_events_07 WHERE user_id = 123456;

# Consistency choices

  • Strong consistency: Financial transactions, inventory decrement critical paths.
  • Eventual consistency: Counters, feeds, recommendations.

Choosing stronger consistency than needed can unnecessarily reduce throughput.

# 5) Reliability, observability, and cost controls in production

Serving 100 million requests/day in production means planning for failure from day one.

# Reliability controls

  • Timeouts on all network calls
  • Retries with exponential backoff + jitter
  • Idempotency keys for write APIs
  • Graceful degradation (fallback data, partial page rendering)
  • Multi-AZ deployment for zone-level failures

# Observability essentials

  • Metrics: RPS, p50/p95/p99 latency, error rate, queue lag, cache hit ratio
  • Logs: Structured JSON logs with request IDs
  • Tracing: End-to-end latency by service

Warning: If you can’t observe queue lag, DB connection saturation, and cache hit ratio in real time, you’re operating blind at this scale.

# Cost optimization that doesn’t hurt reliability

  • Increase cache hit rate before scaling DB vertically
  • Autoscale stateless app tier based on CPU + request queue depth
  • Use tiered storage and retention policies for logs/events
  • Compress payloads and avoid over-fetching

# 6) Practical rollout plan (from MVP to 100M/day readiness)

  1. Phase 1: Stateless APIs behind a load balancer, single DB, Redis cache.
  2. Phase 2: Add read replicas and queue for async tasks.
  3. Phase 3: Add rate limiting, circuit breakers, and autoscaling.
  4. Phase 4: Introduce CQRS and sharding based on observed bottlenecks.
  5. Phase 5: Multi-region strategy if latency/SLA requires it.

Run regular load tests and chaos drills. Capacity planning is not one-time work; it is continuous.

# Conclusion

Designing a system to handle 100 million requests per day is an engineering discipline, not a mystery. Start with traffic math, build layered architecture, and apply proven patterns where they solve real bottlenecks. In most cases, Cache-Aside for fast reads, Queue-Based Load Leveling for burst absorption, and Circuit Breakers/Bulkheads for fault isolation form the strongest foundation. Add CQRS and sharding when your read/write paths outgrow single-model designs. Keep your system observable, degrade gracefully during incidents, and evolve architecture in phases. That is how high-traffic systems stay fast, stable, and cost-efficient in production.