Search
Lessons (40)
- Message Queues & RabbitMQ
… The ticket rail is a message queue : - Producer (waiter): puts messages in. - Queue (rail): holds them safely, in …
- AWS Messaging: Queues, Topics and Events
… With one queue, several workers compete for work. With an SNS topic connected to separate queues, email and …
- Stacks & Queues
Stacks are last-in-first-out, queues are first-in-first-out. Two simple structures behind undo buttons …
- 500 Users Upload Documents at Once: Design the Background Job Pipeline
… Put a small ticket in the queue The queue message holds only the job id . The file lives …
- Concurrency, Resilience & Distributed Workflows
… Propagate a trace ID across HTTP, queue messages and scheduled jobs. Record spans for database calls, queue wait …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… topic + partition by key Ordering Per queue (with one consumer) Per partition Throughput High (tens of thousands of …
- Graphs: BFS & DFS
… It powers GPS navigation and network routing. (See Heaps & Priority Queues .) Key takeaways - Graph = nodes + edges; directed or …
- Timeouts, Retries & Backpressure
… A queue (waiting line) in software works the same way. A queue is fine for short bursts. But …
- Heaps & Priority Queues
… That's a priority queue , and a heap is the clever data structure that implements it efficiently. Structure …
- Message Delivery: Queues, Kafka, Ordering and DLQs
… Pick the right tool - A work queue is for jobs where one worker should handle each one. A …
- Design a Reliable Notification System
… Here is what goes wrong with one shared queue: 1. The million promo emails go into the queue …
- JavaScript Essentials: Event Loop, Closures & this
… call stack, Web APIs, task queues](/img/frontend/event-loop.svg) Part Kitchen analogy Role --- --- --- Call stack The …
- Trees & Binary Search Trees
… pre-, in-, post-order (DFS) and level-order (BFS with a queue). - In-order traversal of a BST …
- C4 Architecture Diagrams: Context, Container, Component and Code
… a web app, API, database, queue, worker, or mobile app. Think of a shopping mall: - The context diagram …
- Proxies, APIs and Real-Time Protocols
… Pick REST, RPC, queues, long polling, WebSockets, TCP or UDP by asking what the user is actually doing …
- Event-Driven Patterns, Step Functions and Reliable Lambdas
Build resilient serverless workflows with retries, dead-letter queues, idempotency, fan-out and orchestration. Messages are delivered at …
- Flash Sale: 10 Million Buyers, No Oversell
… It doesn't hold or count any phones. - Workers pull from the queue in parallel , so many can …
- Design a Polite Web Crawler
… One line per website, not one big line ❌ Wrong: one giant first-in-first-out queue (FIFO). If …
- Product-Scale Frontend Patterns
… Decide which reads can be stale, which writes can queue, how conflicts resolve, and how users see sync …
- 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 …
- GitOps, Progressive Delivery and Observability
… aws-sqs-queue metadata: queueURL: https://sqs.ap-south-1.amazonaws.com/123456789012/jobs queueLength: "20" awsRegion: ap …
- What Is Apache Kafka?
… each group has its own offsets Replay old messages ❌ ✅ Rewind the offset Ordering Per queue Per partition Throughput …
- Serverless Architecture
… JSON.stringify(result) }; }; When to use it ✅ Spiky or unpredictable traffic, event processing (uploads, queues, webhooks), scheduled jobs …
- Backend Design Scenarios
… Protect the rest of the system with a separate worker pool, queue capacity limits, bulkheads, priority queues and …
- Service Communication: Sync vs Async
… sync for queries the user waits on, events for state changes, queues for background jobs.
- Resilient Service Calls: Retries, Breakers and Load Shedding
… 2. Queue age (how long the oldest waiting request has waited) stays bounded. 3. Successful requests per second …
- The L6 System-Design Thinking Loop
… Let the database decide who wins A queue (a waiting line) is useful to control how many people …
- Debug Latency Like an Investigator
… waiting in a queue, waiting on a lock, paused, or waiting on another service. CPU can be low …
- L6 Production Debugging Casebook
… waiting in a queue, waiting for a database connection, running SQL, a remote call, a lock, or GC …
- Observability: Logs, Metrics & Traces
… CPU, memory, queues"] If you only build one dashboard, build this one, per service. Pillar 3: Traces, the …
- Async JavaScript: Promises, async/await and Node's Event Loop
… Between every callback, Node empties two high-priority queues: first process.nextTick , then promise microtasks. mermaid flowchart LR …
- Which Pattern Do I Need?
… algorithms<br/ at runtime"] -- ST[Strategy] P11["Undo / queue / log actions"] -- CM[Command] P12["Behaviour depends on status …
- Scaling, Load Balancing & Rate Limiting
… Measure latency and queueing before changing algorithms. L4 versus L7 Layer 4: connection-level balancing An L4 balancer …
- Serverless: Lambda and API Gateway
… For failed asynchronous work, configure a dead-letter queue or failure destination so messages are not silently lost …
- Kafka for Backend Services
… Think of it like this: - A queue is a to-do list : a job is crossed off when …
- AWS: Start Here
… you can rent a server, database, file storage, network, or message queue in minutes. Where AWS runs your …
- Go Concurrency: Goroutines, Channels and Context
… Each P holds a queue of ready goroutines and runs them on its M (thread), one at a …
- Arrays & Strings
… If you need fast adds and removes at both ends, use a queue or deque (see Stacks & Queues …
- Storage Engines & Database Operations
… checkpoint pressure Connection pool Limits scarce DB connections Queueing/starvation when overloaded Connection pools are a shared budget …
- Portfolio and GitHub That Prove Your Skills
… URL shortener with rate limiting and analytics; order service with a queue and idempotent payments. - Frontend : dashboard with …