Search
Lessons (40)
- State, Remote Backends, and Locking
Share state through S3, enable native locking, migrate safely, and protect recovery data. Why state exists A resource …
- ACID, Transactions & Locks
Make multi-step changes correct with atomic transactions, isolation choices, constraints and short-lived locks. The bank-transfer …
- HCL, Resource Addresses, and Project Layout
… Review the lock-file diff and resulting plan together. The lock file does not lock remote module versions …
- CI/CD and Reviewed Production Changes
… Two jobs writing the same state should not race; use both backend locking and CI concurrency controls. Commands …
- Debug Latency Like an Investigator
… Check database lock waits, query plans and connection counts. Correlate the release with changed query shape or concurrency …
- Transactions, Indexes & Concurrency
… transactions protect invariants while indexes speed access and locks coordinate writers](/img/database-interviews/transactions.svg) Q8: What …
- L6 Production Debugging Casebook
… Put p50, p95, p99, throughput, error rate, pod CPU, GC pauses, pool wait, database locks, query latency and …
- Time, Consistency and Distributed Transactions
Reason about clocks, ordering, split brain, locks, CRDTs and transactions without promising impossible global certainty. The problem in …
- Database Indexing & Transactions
… lock the row (pessimistic locking) sql BEGIN; SELECT seats left FROM flights WHERE id = 42 FOR UPDATE; -- others …
- Drift, Troubleshooting, and Disaster Recovery
… review State lock error Another runner, crashed operation, lock metadata Wait or establish that the lock is stale …
- Arrays & Strings
… Because the lockers are side by side and numbered, you can walk straight to locker 42 without opening …
- Concurrency, Resilience & Distributed Workflows
… FOR UPDATE (pessimistic locking) or a version column (optimistic locking). Keep transactions short, never call an external service …
- Resilience, Disaster Recovery and Multi-Region Design
… Lock (WORM) to protect against ransomware and deletion. - Enable S3 versioning , MFA delete where appropriate, and Object Lock …
- 10,000 Users Do Not Need 10,000 Database Connections
… Adding connections can increase locks and I/O contention; first remove the measured query/transaction bottleneck and limit …
- Production Capstone and Interview Practice
… Require a reviewed lock file and serialized applies. After apply, inspect bucket settings, record the resource addresses, and …
- Distributed Coordination: Consensus, Heartbeats and Gossip
… A lock alone did not protect the payout. Use a monotonically increasing fencing token : A has token 41 …
- The Hot SKU Alert Problem
A staff-level design exercise for notifying millions of watchers without losing delivery guarantees, flooding providers or locking …
- Caching & Redis
… A lock is an optimization, not a reason to make the database unavailable. 4. Caching errors and empty …
- Capacity Planning, SLOs and Error Budgets
… CPU, connection-pool use, queue age, disk, provider quota and database locks. - Connect cost to the design: caching …
- Go Concurrency: Goroutines, Channels and Context
… Mutex, RWMutex, atomic, Once Sometimes a lock is simpler than a channel, for example a cache or a …
- Storage Engines & Database Operations
… wait, active connections, transaction age, slow-query fingerprints, lock waits, replica lag, cache hit rate, WAL/checkpoint or …
- Rust: Types, Errors and Concurrency
… Vec< = (0..8) .map( { let counter = Arc::clone(&counter); thread::spawn(move { counter.lock().unwrap() += 1; }) }) .collect(); for …
- Docker & Containers
… small and secure ---- FROM node:22-alpine WORKDIR /app ENV NODE ENV=production COPY package.json package-lock …
- Multi-Account Strategy, Governance and Security Operations
… A bad SCP can lock teams out. Control Tower and landing zones AWS Control Tower builds a landing …
- Serverless Architecture
… several seconds, depending on runtime and bundle Vendor lock-in Triggers, IAM and managed services are provider-specific …
- DynamoDB Modeling, RDS Scaling and Data Resilience
… across up to 100 items Conditional writes Optimistic locking: attribute not exists(PK) DAX In-memory cache for …
- Edge, Platform & Frontend Delivery
… Build once from a pinned dependency lockfile. 2. Publish immutable static assets before or with the application release …
- Your First Terraform Project
… belongs in Git? Commit .tf files and .terraform.lock.hcl . Do not commit the downloaded .terraform/ directory, state …
- Data in Microservices: Sagas & the Outbox Pattern
… It exists, but in microservices it's usually avoided: - Every participant is locked while waiting for the slowest …
- Database Internals, Replication and Scaling
… Is an index missing? Is the query returning far more rows than expected? Is a transaction holding locks …
- Rust: Ownership, Borrowing and Lifetimes
… This frees memory and closes files, sockets and locks. rust { let file = File::create("log.txt")?; let guard …
- Secrets, Ephemeral Values, and Least Privilege
… read-only. Handle artifacts carefully Commit the provider lock file; keep secrets out of Git. Protect plan artifacts …
- Python Fundamentals
… int) - dict None: ... Concurrency and the GIL CPython has a Global Interpreter Lock : only one thread runs Python …
- Cluster Networking, DNS and NetworkPolicies
Understand the Kubernetes network model, how service discovery works, and how to lock down pod-to-pod traffic …
- Monolith vs Microservices
… no shared databases, no lock-step deploys.
- A WhatsApp OTP Is Only Single Use If You Make It So
… The database locks the row for the first; the second waits, then re-evaluates the condition consumed at …
- What Is Software Architecture?
… great scale, but complex queries and more vendor lock-in text docs/adr/ ├── 0001-record-architecture-decisions.md …
- Frontend Security
… ef4444,color: 7f1d1d class C bad - Commit your lockfile and use npm ci in CI. - Run npm audit …
- Event-Driven Patterns, Step Functions and Reliable Lambdas
… Expiring a lock does not prove the earlier payment failed. text Claim operation → perform idempotent external request → store …
- Choosing an Architecture
… workloads, event processing, zero-ops Cold starts, limits, lock-in, cost at scale A decision guide mermaid flowchart …