Search
Lessons (40)
- Topics, Partitions & Offsets
How Kafka organises data. Why topics are split into partitions, how message keys decide the partition and keep …
- Consumers & Consumer Groups
… This is the committed offset , saved in Kafka's internal consumer offsets topic. If a consumer crashes, its …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
… async ({ topic, partition, message }) = { const tx = await producer.transaction(); try { await tx.send({ topic: "ledger", messages: [{ key: message …
- Heaps & Priority Queues
… keep a min-heap of size k . The heap's root is the smallest of the top k …
- What Is Apache Kafka?
… append an event const producer = kafka.producer(); await producer.connect(); await producer.send({ topic: "orders", messages: [{ key: "customer …
- Stacks & Queues
… top is running)"] direction TB c["c() ⬅ running"] --- b["b()"] --- a["a()"] --- g["global"] end Infinite recursion keeps …
- Event-Driven Architecture
… Broker vs mediator topologies, the four kinds of event patterns, event design, and the real trade-offs. The …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… direct, topic, fanout, headers exchanges Simple: topic + partition by key Ordering Per queue (with one consumer) Per partition …
- Scaling & Health Probes
… scale consumers on Kafka lag triggers: - type: kafka metadata: bootstrapServers: kafka:9092 consumerGroup: email-service topic: shop.orders …
- Brokers, Replication & Durability
… Keep it false for important topics.) The controller and KRaft One broker acts as the controller : it tracks …
- Dynamic Programming
… add a memo (top-down DP) → optionally convert it to a table (bottom-up). Key takeaways - DP = recursion …
- Graphs: BFS & DFS
… stack / recursion) = go deep, backtrack = cycles, components, topological sort. - Always keep a visited set, or cycles will loop …
- Which Pattern Do I Need?
… Microservices and Kafka lessons: Object-level pattern System-level cousin --- --- Observer Pub/Sub, Kafka topics, event-driven architecture …
- Comments & Formatting
… important things at the top, details below](/img/clean-code/newspaper.svg) Vertical order: top-down, like a …
- Backend Languages: Node.js, Go, Python & Rust
… the king of AI/data; FastAPI for modern APIs, Django for full-featured apps. - Rust: top performance with …
- DSA Interview Patterns Cheat Sheet
… all / connected / cycles DFS[DFS] C -- no D{Top K / min / max<br/ repeatedly?} D -- yes H[Heap …
- Structural Patterns: How to Connect Objects
… Each topping wraps the drink, adds something (price, flavour), and it's still a coffee. Problem: add responsibilities …
- How Browsers Render a Page
… Read the blueprint (HTML) → know which rooms exist ( DOM ). 2. Read the interior design notes (CSS) → know the …
- Trees & Binary Search Trees
… one person at the top, each person has zero or more people below them, and nobody reports to …
- Message Queues & RabbitMQ
… Routing rule Example --- --- --- Direct Exact routing key match "pdf" → pdf-queue Topic Wildcards: = one word, = zero or more …
- Authentication, Authorization & API Security
… A 401 Unauthorized means "I don't know who you are". A 403 Forbidden means "I know who …
- Helm, kubectl Cheat Sheet & Best Practices
… kubectl rollout restart deploy/shop-api Resource usage kubectl top pods / kubectl top nodes Recent events kubectl get …
- React Hooks in Practice
… context during render (with Suspense) Key takeaways - Call hooks at the top level, in the same order every …
- Vertical Slice Architecture & the Modular Monolith
… network call. Key takeaways - Vertical slices organise code by feature: one folder per use case, top to bottom …
- SOLID at a Glance
Five design principles that keep object-oriented and modular code easy to extend, test and change. One picture …
- Clean Architecture in Depth
… can know anything about something in an outer circle, not even its name. 💡 The Clean Code topic has …
- Small Functions That Do One Thing
… No "and" in its description. - The top-level function should read like a table of contents. - Keep one …
- Clean Error Handling
… Fail fast with guard clauses Check bad input at the top of the function and exit immediately. This …
- Code Smells & Refactoring
… which currency? cents or dollars? rounding? function addTax(price) { return price 1.2; } // ✅ A small object that knows …
- Clean Architecture
… Inner layers never know about outer layers. 🏛️ Want to go deeper? This lesson is the introduction. The …
- Monolith vs Microservices
… payments must keep working when recommendations are down. ❌ Bad reasons: - "Netflix does it." (Netflix has thousands of engineers …
- Big-O Notation Made Simple
… average O(n log n), worst O(n²) with bad pivots. Key takeaways - Big-O = how work grows …
- Kafka Producers
… topic: "shop.orders.placed", acks: -1, // all in-sync replicas compression: CompressionTypes.GZIP, messages: [ { key: order.id, // keeps …
- Finding Service Boundaries with DDD
… architecture/ddd-tactical-design) in the Software Architecture topic. Key DDD vocabulary Term Meaning Example --- --- --- Domain The business …
- Scaling, Load Balancing & Rate Limiting
… the key to scaling out If a server keeps user sessions in its own memory , the next request …
- Frontend Security
… Clickjacking An evil page loads your site in an invisible iframe on top of a fake "Win a …
- Sorting Algorithms
… That matters when you sort by several keys. The simple O(n²) sorts Bubble sort: big items "bubble …
- Choosing an Architecture
… Hexagonal, Stripe behind an ACL"] b1((core)) -- b2[Stripe adapter] end end Mono -- events via outbox K[(Kafka …
- Caching & Redis
… Hot key One key (a celebrity's profile) gets so much traffic it overloads a single Redis node …
- Hexagonal Architecture (Ports & Adapters)
… Cockburn drew a hexagon to escape the "top-to-bottom layers" picture, and to show there are many …