Search
Lessons (30)
- Message Queues & RabbitMQ
… The ticket rail is a message queue : - Producer (waiter): puts messages in. - Queue (rail): holds them safely, in …
- Stacks & Queues
Stacks are last-in-first-out, queues are first-in-first-out. Two simple structures behind undo buttons …
- Proxies, APIs and Real-Time Protocols
Pick REST, RPC, queues, long polling, WebSockets, TCP or UDP based on the interaction shape.  One deadline …
- Graphs: BFS & DFS
… It powers GPS navigation and network routing. (See Heaps & Priority Queues .) Key takeaways - Graph = nodes + edges; directed or …
- Heaps & Priority Queues
… That's a priority queue , and a heap is the clever data structure that implements it efficiently. Structure …
- JavaScript Essentials: Event Loop, Closures & this
… call stack, Web APIs, task queues](/img/frontend/event-loop.svg) Part Kitchen analogy Role --- --- --- Call stack The …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… topic + partition by key Ordering Per queue (with one consumer) Per partition Throughput High (tens of thousands of …
- Trees & Binary Search Trees
… pre-, in-, post-order (DFS) and level-order (BFS with a queue). - In-order traversal of a BST …
- Flash Sale: 10 Million Buyers, No Oversell
A queue smooths traffic but does not reserve stock. The durable inventory owner decides the winner atomically. The …
- Debug Latency Like an Investigator
… Inspect queue age, pool acquisition, query plan/locks, pauses, or dependency timing. 4. Apply the smallest reversible mitigation …
- Behavioral Patterns I: Observer, Strategy, Command, State
… The request became an object . Problem: you want to queue, log, undo or redo operations. js class TextEditor …
- Serverless Architecture
… JSON.stringify(result) }; }; When to use it ✅ Spiky or unpredictable traffic, event processing (uploads, queues, webhooks), scheduled jobs …
- What Is Apache Kafka?
… each group has its own offsets Replay old messages ❌ ✅ Rewind the offset Ordering Per queue Per partition Throughput …
- Service Communication: Sync vs Async
… sync for queries the user waits on, events for state changes, queues for background jobs.
- Scaling & Health Probes
… Autoscaling The big idea A supermarket opens more checkout lanes when the queues get long, and closes some …
- Design a Reliable Notification System
… preferences feed priority queues, channel providers and idempotent delivery tracking](/img/system-design-l6/notifications.svg) Create an …
- Time, Consistency and Distributed Transactions
… Avoid distributed locks where atomic database/queue claiming owns the state. Two-phase commit offers coordinated atomicity but …
- Observability: Logs, Metrics & Traces
… CPU, memory, queues"] If you only build one dashboard, build this one, per service. Pillar 3: Traces, the …
- Which Pattern Do I Need?
… algorithms<br/ at runtime"] -- ST[Strategy] P11["Undo / queue / log actions"] -- CM[Command] P12["Behaviour depends on status …
- Premiere-Night Video Streaming
… cap bitrate, disable previews, or queue sessions. Heartbeat progress to Redis for fast resume and persist asynchronously to …
- Caching & Redis
… leaderboards, rate limits, queues, sessions.
- Storage Engines & Database Operations
… checkpoint pressure Connection pool Limits scarce DB connections Queueing/starvation when overloaded Connection pools are a shared budget …
- Arrays & Strings
… If you need fast adds and removes at both ends, use a queue or deque (see Stacks & Queues …
- DSA Interview Patterns Cheat Sheet
… n) O(n) O(1) O(1) Stack / queue – O(n) O(1) O(1) Balanced BST O …
- Scaling, Load Balancing & Rate Limiting
… S5["5️⃣ DB read replicas"] S5 -- S6["6️⃣ Queues for background work"] S6 -- S7["7️⃣ Sharding / split into …
- Hexagonal Architecture (Ports & Adapters)
… The application core sits in the middle; everything else (web UI, REST API, tests, database, email, message queues …
- KISS: Keep It Simple, Stupid
… Add microservices, queues and caches when real problems show up, not before. How to practise KISS Ask yourself …
- Clean Error Handling
… order); } catch (error) { if (error instanceof ConnectionError) return queueForRetry(order); throw error; // …otherwise let it travel up } 💡 Only …
- What Is Software Architecture?
… and external systems Everyone 2. Container Apps, databases, queues inside the system Developers, ops 3. Component Main modules …