Search
Lessons (40)
- Train Your First Model from Scratch
… slope x + intercept) print(f"slope={slope:.3f}, intercept={intercept:.3f}") print(f"baseline test mse={baseline error …
- Capacity Planning, SLOs and Error Budgets
… For request-based SLOs, calculate the allowed failed fraction from eligible requests instead. 3. Load-test peaks and …
- Linked Lists
… Fast & slow pointers (tortoise and hare) Two pointers move through the list: slow moves 1 step, fast moves …
- Two Pointers & Sliding Window
… remove duplicates in place (fast & slow) js // [1, 1, 2, 2, 2, 3] → first 3 slots become [1 …
- Resilience Patterns
… Without it, one slow service causes a cascading failure : mermaid flowchart LR U[👥 Users] -- G[Gateway] -- O[Orders …
- Code Profiling
Find the code that is actually slow or retaining memory before you optimise. Learn a repeatable profiling workflow …
- Debug Latency Like an Investigator
… Compare healthy and slow traces; locate the span that gained time. 3. Inspect queue age, pool acquisition, query …
- Observability: Logs, Metrics & Traces
… Learn the three pillars, the golden signals, SLOs and OpenTelemetry. The big idea A car dashboard shows your …
- Next.js Rendering: CSR, SSR, SSG, ISR & Server Components
… JSON Note over B: ✅ page visible (late) ✅ Rich interactivity, cheap hosting (static files). ❌ Slow first paint on slow …
- 10,000 Users Do Not Need 10,000 Database Connections
… an average query time can hide a small number of very slow queries that occupy the pool for …
- Backend Design Scenarios
… One downstream service becomes slow and suddenly the whole application is slow. How do you stop one dependency …
- Resilient Service Calls: Retries, Breakers and Load Shedding
Keep one slow dependency from turning a small outage into a full-system outage. The problem in context …
- CloudWatch: Know What Your App Is Doing
… Search affected request IDs and trace slow/error paths. 4. Use the approved mitigation: rollback or restore capacity …
- L6 Production Debugging Casebook
… Compare one slow distributed trace with a healthy trace for the same route. Find the span that gained …
- Releases, Observability and Production Safety
… CI validates an immutable artifact, controlled rollout observes SLOs, and a rollback path limits blast radius](/img/system …
- Design a Logging and Monitoring Platform
… Alerts should use user-facing SLO symptoms and link to runbooks. Preserve tenant isolation, retention controls and an …
- 500 Users Upload Documents at Once: Design the Background Job Pipeline
Move slow document processing out of the HTTP request with object storage, a job table, a task queue …
- Storage Engines & Database Operations
… Bound pool size, reserve capacity for critical traffic, set deadlines and investigate long transactions or slow queries. Backups …
- Timeouts, Retries & Backpressure
A slow dependency should consume a bounded budget, not create an infinite retry storm. The problem in context …
- Observability and Incident Response
… views of the same request Imagine checkout becomes slow at 2:05 PM. - Metrics say p99 latency rose …
- Indexes, EXPLAIN & Query Plans
… writes become slow and memory pressure rises. - Putting a low-selectivity flag first: most rows still match. - Wrapping …
- Database Indexing & Transactions
… and / < fast. Creating and checking indexes (PostgreSQL) sql -- Slow: no index on email SELECT FROM users WHERE email …
- Frontend Performance & Core Web Vitals
… Real users on slow phones matter most. Fixing LCP: show the main content sooner mermaid flowchart LR T …
- React Internals & Concurrent Rendering
… Measure and fix the expensive path if it remains slow. Suspense and streaming Suspense shows a fallback while …
- Monolith vs Microservices
… one table breaks 3 services", "one slow service makes everything slow". Conway's Law 📘 "Organisations design systems that …
- Proxies, APIs and Real-Time Protocols
… messages. How to prove it worked Test disconnects, slow clients and rolling restarts. Measure reconnect success, update lag …
- Arrays & Strings
… See how arrays live in memory, why some operations are instant and others slow, and the essential string …
- Caching & Redis
… flush a non-production cache and confirm the application becomes slower temporarily, not incorrect or unavailable. Two related …
- Views, Triggers & Stored Procedures
… but row-by-row cursor updates are often slow. Prefer set-based updates, clear ownership and auditability. Use …
- Design a URL Shortener
… able to see clicks without making every redirect slow. Example requirements: 10,000 redirect requests per second at …
- What Is Clean Code?
… a little slower at the start, much faster later. This hidden cost is called technical debt . Like a …
- YAGNI: You Aren't Gonna Need It
… Error handling and security Caching layer before measuring slowness Code that is easy to change later 💡 The secret …
- Concurrency, Resilience & Distributed Workflows
… when only one run is allowed. Backpressure means slowing producers or shedding optional work when consumers cannot keep …
- AWS Messaging: Queues, Topics and Events
… A queue lets checkout finish after the order is safely accepted, while a worker handles the slow task …
- Go Web Services with Gin
… 5 time.Second, // protects against slow-loris clients ReadTimeout: 10 time.Second, WriteTimeout: 15 time.Second, IdleTimeout: 60 …
- Clean Architecture in Depth
… I/O, external services, time, randomness Every CRUD screen goes through 6 layers Slow development Keep simple reads …
- Backend Languages: Node.js, Go, Python & Rust
… CPU threads) AI/ML, data, scripting, fast prototyping Slower raw speed Rust async (Tokio) + threads, no data races …
- Docker & Containers
… handling sacks, barrels and crates of every shape: slow and chaotic. The standard shipping container changed everything: any …
- DSA Interview Patterns Cheat Sheet
… 3. Brute force: say it out loud with its complexity, even if it's slow. It shows you …
- Consumers & Consumer Groups
… be sorted. One person can do it alone, slowly. A team can split the pile so each person …