Search
Lessons (24)
- Capacity, Availability, Latency and CAP
… a design chooses latency targets, availability targets and a partition-time consistency policy](/img/system-design-l6/capacity …
- Debug Latency Like an Investigator
High CPU is not required for high latency. Follow percentile shape and trace wait time before scaling blindly …
- Observability: Logs, Metrics & Traces
… request duration seconds What are p50, p95, p99 latencies? js import client from "prom-client"; const httpDuration = new …
- Design a Ride-Sharing Service
… Watch stale-location age, match latency, conflicts and regional imbalance.
- Design a Logging and Monitoring Platform
… Measure ingestion lag, dropped samples, query latency, cardinality and storage cost.
- System Design Interview Framework
… framework.svg) 1. Clarify users, core flows, scope, latency, availability and consistency. 2. Estimate peak RPS, storage, bandwidth …
- Real-Time, Pub/Sub, Webhooks and CDC
… retry and make receiver idempotent WebRTC Direct low-latency media/data Needs signaling, NAT traversal and fallback Pub …
- Service Communication: Sync vs Async
… Total latency = sum of every hop. Any failure = whole request fails. ✅ Simple to understand and debug; you get …
- Caching, Consistent Hashing and Sharding
… distribution.svg) Tool Solves Risk --- --- --- Cache Repeated read latency/load Stale data and stampedes Consistent hash ring Placement …
- Networking, DNS and Traffic Routing
… Monitor DNS TTL/propagation, edge health, connection errors, regional latency and uneven load. A DNS answer is not …
- Deploying & Operating Microservices
… to the new version, watching error rates and latency at each step. If metrics get worse, roll back …
- Timeouts, Retries & Backpressure
… jobs to a visible DLQ. Watch: queue age, saturation, rejected work, dependency latency, retries, and error-budget burn.
- N+1 Queries, Loading & Pagination
… acquisition time, returned rows and p95/p99 endpoint latency. In development, log duplicate query fingerprints. In production, sample …
- Serverless Architecture
… runtimes (Node, Go, Rust), use provisioned concurrency for latency-critical paths, or edge runtimes (Cloudflare Workers, Vercel Edge …
- Resilience Patterns
… AbortSignal.timeout(2000), // give up after 2 s }); 💡 Base timeouts on the dependency's p99 latency plus a …
- Caching & Redis
… the closer the data, the faster it is](/img/backend/latency-ladder.svg) Where data lives Typical latency …
- Monolith vs Microservices
… a system: 1. The network is reliable. 2. Latency is zero. 3. Bandwidth is infinite. 4. The network …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… topic Stream processing ❌ ✅ Kafka Streams, Flink, ksqlDB Typical latency Very low for individual messages Low, optimised for throughput …
- Backend Languages: Node.js, Go, Python & Rust
… guaranteed by the compiler Performance-critical systems, low latency, low memory Steep learning curve, slower compile times The …
- Message Queues & RabbitMQ
… in Node.js NATS Lightweight pub/sub Low-latency messaging Key takeaways - Queues decouple producers and consumers, smooth …
- Kafka Producers
… batch Higher = bigger batches, better throughput, slightly more latency batch.size Max bytes per batch per partition Bigger …
- API Gateway, BFF & Service Discovery
… every call Trade-off: more moving parts, extra latency per hop and extra resources. Worth it with many …
- Scaling, Load Balancing & Rate Limiting
… at a fixed rate Very smooth output, adds latency In a multi-server setup, keep counters in Redis …
- Choosing an Architecture
… automated checks for architecture rules (dependency rules, latency budgets) Guard the architecture continuously in CI ADRs for every …