Skip to content
Hide sidebar
Knowledge Hub
Search
Ctrl
K
Cancel
Select theme
Dark
Light
Auto
Select language
English
Tiếng Việt
Menu
Playground
Overview
Database
Flash sale
Pick lock/isolation
Query slowly gets slower
Pick an index type
Migration locks table
Tenant data leak
Create index online
Rename a column
Scale Lab
Scale Lab
Problem: URL shortener
Problem: Ticketing
Problem: Notifications
Problem: Realtime chat
Scale Lab: Sandbox
System design
Build a URL shortener
Async checkout
Image & video upload
Celebrity post
Saga compensation
Payment timeout
HTTP status code
Cache-Control
Pick a design pattern
Messaging & cache
Kafka lag rising
Schema compatibility
Cache stampede
Operations & incidents
3 a.m. incident
Response order
Retry storm
Memory leak
CPU throttling
Cascading probe restarts
Graceful shutdown
Canary & feature flags
Security & observability
Leaked JWT
OAuth PKCE flow
API data leak
Log, metric or trace?
Data platform
PostgreSQL
Overview
Storage & indexes
Page, heap, tuple, TOAST
B-tree index
Composite index
Partial, expression, covering
GIN, GiST, BRIN
Why an index is not used
Query & planner
Reading EXPLAIN
Statistics and ANALYZE
Join algorithms
OFFSET and keyset
Partitioning
Transaction & MVCC
ACID
MVCC
Anomalies
Isolation levels
Transactions in code
VACUUM and bloat
XID wraparound
Locking
Row-level locks
Table-level locks
Lock queue
NOWAIT and SKIP LOCKED
Optimistic vs pessimistic
Advisory lock
Deadlock
Lock timeouts and monitoring
Operations
Connection pooling & PgBouncer
Replication & read replica
Upsert: ON CONFLICT
Misused data types
UUID or bigint keys
Row-level security & multi-tenancy
Cache & Redis
Overview
Cache-aside
Cache stampede
Expiration and eviction
Redis event loop
Redis data structures
Persistence: RDB and AOF
Pipelining, MULTI and Lua
Distributed lock
Cache penetration & avalanche
Communication & distribution
Messaging
Overview
Kafka: fundamentals
Distributed log
Keys and ordering
Consumer group, rebalance
Offset commit
Kafka: durability
Replication, ISR, acks
Idempotent producer
Transactions, exactly-once
Retention, compaction
Kafka: operations
Consumer lag
Retry topics and DLQ
Share groups
RabbitMQ
Exchanges and routing
Ack, prefetch, confirms
Dead-letter and TTL
Queue types
Common patterns
Idempotent consumer
Transactional outbox
Event schema evolution
Distributed systems
Overview
Eight fallacies
Retry, backoff, jitter
Logical clocks
Circuit breaker & bulkhead
Saga pattern
API & networking
Overview
API errors (RFC 9457)
Timeout budget
Webhooks
Rate limiting
Idempotency-Key
HTTP caching
Architecture & code
Architecture
Overview
Monolith or microservices
Bounded context
Hexagonal & clean architecture
CQRS & event sourcing
Design patterns
Overview
Adapter
Strategy
Decorator
Observer & domain events
NestJS
Overview
Modules, providers, controllers
Dependency injection
Provider scope
Request lifecycle
Custom decorators & Reflector
Dynamic module
DTO validation
Exception filters & error responses
Cross-service transactions (CLS)
Node.js
Overview
Event loop
Streams and backpressure
AsyncLocalStorage
Engineering practices
Overview
Naming
Overview
Core rules
PostgreSQL
API, events, env
Common mistakes
Clean code
Overview
Safe refactoring
Functions and side effects
Errors, comments, DRY
Common mistakes
Common coding mistakes
Overview
Async & errors
Numbers, dates, strings
Database & transactions
API & security
Performance & resources
Git
Overview
Commits
Branch & merge
Recovery
Secrets & PRs
Common mistakes
Code review
Overview
Review priorities
PR author
Reviewer
Writing comments
Anti-patterns, metrics
Common mistakes
ADRs & docs
Overview
What is an ADR
Writing good ADRs
Docs beyond ADRs
Keeping docs alive
Common mistakes
Config & 12-factor
Overview
12-factor & build
Parse & validate
Kubernetes & runtime
Common mistakes
Incidents & postmortems
Overview
Incident response
Hypothesis debugging
Communication
Postmortem
Common mistakes
Operations & quality
Observability
Overview
Logs, metrics, traces
Correlation ID
SLI, SLO, error budget
Metric cardinality
Security
Overview
BOLA / IDOR
CORS and CSRF
SSRF
Session or JWT
Secure coding
Password hashing
OAuth 2.0, OIDC and PKCE
Testing
Overview
Unit, integration, e2e
Flaky tests
Load testing with k6
Testcontainers
DevOps
Overview
Health probes
Graceful shutdown
Expand–contract
Docker multi-stage & non-root
Requests & limits
Deployment strategies
Reference
Case studies
Overview
URL shortener
News feed
Payment system
Glossary
Overview
Select theme
Dark
Light
Auto
Select language
English
Tiếng Việt
Tag: cdn
Basic
This content is a draft and will not be included in production builds.
5 articles tagged
cdn
:
Design: build a shortener that handles 38,600 req/s
Design: uploading images and 2 GB lecture videos
HTTP caching: who may store a response, and for how long?
Matching: pick the Cache-Control for each response
Scale Lab — Interview problem: URL shortener