Search
Lessons (40)
- Design a Logging and Monitoring Platform
… l6/telemetry-platform.svg) Agents batch and compress logs, metrics and traces to an authenticated ingestion gateway. A …
- Observability: Logs, Metrics & Traces
… Logs, the "why" A log is a timestamped record of an event. Write structured logs (JSON), not free …
- MVC, MVP & MVVM
Three patterns for separating what the user sees from the data and logic behind it. How each works …
- Sorting Algorithms
… beating n log n Comparison sorts can't beat O(n log n). But if values are small …
- JavaScript Essentials: Event Loop, Closures & this
… run all microtasks, then one task The famous quiz js console.log("1"); setTimeout(() = console.log("2"), 0 …
- Big-O Notation Made Simple
… O(1), O(log n), O(n), O(n log n), O(n²). The steepest curve explodes fastest …
- Authentication, Authorization & API Security
… Click "Log in with Google" App- U: redirect to Google (+ PKCE challenge) U- G: log in + consent G …
- Pods
… writes logs to /var/log"] -- Vol[("shared volume")] Vol -- Side["📤 log-shipper sidecar<br/ sends logs to Loki …
- What Is Apache Kafka?
Kafka is a distributed, durable log of events that many systems can write to and read from at …
- Heaps & Priority Queues
… Swap with the smaller child"] -- c c -- No e["✅ Return saved min"] The tree's height is log …
- DSA Interview Patterns Cheat Sheet
… O(1) O(n) O(log n) O(log n) \ O(1) at the end · \ \ when you already …
- Frontend Testing Strategy
… pure logic Best for pure functions: formatters, calculations, validation, reducers. ts // cart.ts export function cartTotal(items: { price …
- Helm, kubectl Cheat Sheet & Best Practices
… team-shop } rules: - apiGroups: [""] resources: ["pods", "pods/log"] verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1 …
- Structural Patterns: How to Connect Objects
… Date.now() }); } } const logger = new WinstonAdapter(winston); // the rest of the app is unchanged logger.log("info", "Server …
- D — Dependency Inversion Principle
High-level business logic should depend on abstractions, not on concrete details like databases or email providers. The …
- Distributed Coordination: Consensus, Heartbeats and Gossip
… coordination.svg) Problem Tool Guarantee --- --- --- One ordered configuration/log Raft or Paxos-style consensus Majority agreement Is a …
- Kafka vs RabbitMQ & the Kafka Ecosystem
… RabbitMQ routes and deletes; Kafka stores an ordered log you can replay](/img/kafka/kafka-vs-rabbit.svg …
- Layered (N-Tier) Architecture
… Keep most layers closed, or the separation quickly erodes. Layers vs tiers - Layers are a logical split of …
- Database Internals, Replication and Scaling
… writes become durable log records, replicas serve compatible reads, and pools protect scarce connections](/img/system-design-l6 …
- Choosing an Architecture
… a modular monolith along DDD bounded contexts , Hexagonal/Clean where logic is rich, simpler slices where it isn …
- Docker & Containers
… docker run -d -p 3000:3000 --name api -e DATABASE URL=postgres://… shop-api:1.0 docker logs …
- Creational Patterns: How to Make Objects
… 2 }); console.log(tank.describe()); // Tank: ❤️ 400, 🏃 2 📘 JavaScript itself is prototype-based : every object links to a …
- Clean Error Handling
… logged, then forgotten; the caller thinks it worked try { await saveOrder(order); } catch (e) { console.log(e); } js …
- Storage Engines & Database Operations
Understand B-trees, LSM trees, write-ahead logs, connection pools, backups and the signals behind database reliability. What …
- N+1 Queries, Loading & Pagination
… In development, log duplicate query fingerprints. In production, sample traces rather than logging sensitive SQL values.
- ConfigMaps, Secrets & Storage
… env var env: - name: LOG LEVEL valueFrom: configMapKeyRef: { name: shop-api-config, key: LOG LEVEL } a single key …
- Which Pattern Do I Need?
… an object wrapping another"] W[Wrapper] -- O[Original] end Same -- D["Decorator:<br/ 'I add logging'"] Same -- P …
- Topics, Partitions & Offsets
… the unit of parallelism Each partition is an ordered, append-only log stored on one broker (plus copies …
- Serverless Architecture
… invest in structured logs, tracing (X-Ray / OpenTelemetry) Cost at sustained high load Containers or VMs can be …
- Onion Architecture & Clean vs Hexagonal vs Onion
… All three share the same rule: 🎯 The business logic is at the centre and depends on nothing. Infrastructure …
- Hexagonal Architecture (Ports & Adapters)
… string[]) { const loan = await borrowing.borrow(memberId, bookId); console.log( ✅ Borrowed ${bookId}, due ${loan.dueDate.toDateString()} ); } 3. Driven …
- React Hooks in Practice
… reuse logic Any function starting with use that calls other hooks is a custom hook. It's the …
- Releases, Observability and Production Safety
… Correlate logs, metrics and traces with request IDs; alert on SLO burn, not noise. Protect traffic with TLS …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… 2500 }); // "👔 manager approved" mermaid flowchart LR R[Request] -- H1[Logger] -- H2[Rate limiter] -- H3[Auth] -- H4[Route handler …
- Big Data: ETL, Warehouses and Streaming
… as the main source and reprocesses it when logic changes. Choose based on team operations and freshness needs …
- API Contracts, Gateways and Security
… Use TLS, rate limits, audit logs and secrets management.
- Proxies, APIs and Real-Time Protocols
… A queue is not a WebSocket, and a WebSocket is not a durable message log.
- Real-Time, Pub/Sub, Webhooks and CDC
… Publish committed database changes Use an outbox/transaction log, not app guesses Delivery is usually at-least-once …
- Trees & Binary Search Trees
… Shape Bushy, height ≈ log n A long chain, height = n Search / insert O(log n) O(n) 😢 How …
- 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 …