Search
Lessons (40)
- Transactions, Indexes & Concurrency
… transactions protect invariants while indexes speed access and locks coordinate writers](/img/database-interviews/transactions.svg) Q8: What …
- ACID, Transactions & Locks
Make multi-step changes correct with atomic transactions, isolation choices, constraints and short-lived locks. The bank-transfer …
- Delivery Guarantees: At-Most, At-Least & Exactly Once
Can a message be lost? Delivered twice? Learn Kafka's three delivery semantics, idempotent producers, transactions for read …
- Database Indexing & Transactions
… retry the transaction Transaction tips - Keep transactions short. Never wait for an HTTP call or user input inside …
- Data in Microservices: Sagas & the Outbox Pattern
Each service owns its database, so how do you keep data consistent across services without a shared transaction …
- Concurrency, Resilience & Distributed Workflows
… The transactional outbox writes the business row and an outbox row in one local transaction; a relay publishes …
- Time, Consistency and Distributed Transactions
… You can't wrap them in one transaction. Use a saga : do each step as its own local …
- 10,000 Users Do Not Need 10,000 Database Connections
… Find the slow query or long transaction and fix it (index, smaller transaction, timeout). 2. Limit how much …
- The Hot SKU Alert Problem
… The price update tries to find and notify all 10 million watchers inside the same database transaction . The …
- Kafka for Backend Services
… 1 KAFKA TRANSACTION STATE LOG REPLICATION FACTOR: 1 KAFKA TRANSACTION STATE LOG MIN ISR: 1 bash docker compose …
- Storage Engines & Database Operations
… Bound pool size, reserve capacity for critical traffic, set deadlines and investigate long transactions or slow queries. Backups …
- SQL vs NoSQL Databases
… catches bad data, JOINs answer complex questions, ACID transactions keep money and inventory correct, and SQL is a …
- Message Delivery: Queues, Kafka, Ordering and DLQs
… Service writes the shipment and the marker "event e-500 processed" in one transaction. 2. Service crashes before …
- What Is Software Architecture?
… Use PostgreSQL for the orders service Status Accepted (2026-09-28) Context Orders need multi-row transactions (order …
- Domain-Driven Design: Tactical Patterns
… keeps boundaries clear 4. Use eventual consistency between aggregates One transaction changes one aggregate; others react to domain …
- AWS Databases: Choose the Right One
… It needs queries such as “show an order with its customer and books” and a transaction that saves …
- Indexes, EXPLAIN & Query Plans
… that transaction, avoid long-running ALTER TABLE at peak idle in transaction sessions App opened a transaction and …
- Design an E-Commerce Checkout
… Two more rules: - Don't keep a database transaction open while calling the payment provider. Payment can take …
- Finding Service Boundaries with DDD
… consistency boundaries An aggregate is a group of objects that must stay consistent together , changed in one transaction …
- DynamoDB Modeling, RDS Scaling and Data Resilience
… If you must reserve stock and create an order together, design an appropriate transaction. A stock decrement alone …
- AWS Messaging: Queues, Topics and Events
… An outbox pattern stores an event alongside the order in the database transaction, then publishes it reliably later …
- SQL Interview Query Drills
… cleanup, decide which row to keep in a transaction and add a unique constraint to prevent recurrence. Q25 …
- Views, Triggers & Stored Procedures
… inputs. A trigger runs automatically from an event. Transaction-control and return-value capabilities vary by engine, so …
- Design a Reliable Notification System
… at most 2 promos a week). Receipts and other transactional messages are expected because of something the user …
- SQL Language, Identifiers & Data Types
… Many systems call COMMIT and ROLLBACK transaction-control statements. Q7: Identity, sequence and UUID An identity/auto-increment …
- Flash Sale: 10 Million Buyers, No Oversell
… In the same transaction (all-or-nothing group of changes), also insert the reservation row with a stable …
- Practical Project: Deploy a Real CRM App on EKS
… the outbox transaction error After fixing credentials and the database connection, crm-core still was not ready: text …
- Monolith vs Microservices
… function calls ❌ Slow, unreliable network calls Transactions ✅ One ACID database transaction ❌ Sagas, eventual consistency Testing end to end …
- Database Internals, Replication and Scaling
… 20 per app server) so the database isn't flooded. - Keep transactions short so they don't hold …
- DBMS Foundations, Keys & Normalization
… Why DBMS instead of files? A DBMS centralizes data, supports concurrent access, transactions, constraints, authorization, backup/recovery and …
- Replication, Partitioning & Sharding
… Cross-shard joins and transactions are expensive. Prefer colocating related data, asynchronous aggregates and explicit workflows. Do not …
- AWS Interview Questions: Clear Answers
… add private customer orders Now the shop requires login and transactional order storage. Add user authentication, an authorized …
- A WhatsApp OTP Is Only Single Use If You Make It So
… it matches the person but isn't the person. Transaction A group of database steps that all succeed …
- CQRS & Event Sourcing
… It stores every transaction : deposit $100, withdraw $30, deposit $50. The balance is simply the sum. You can …
- AWS: Start Here
… and customers RDS PostgreSQL Store structured data with transactions Uploaded covers Private S3 bucket Store file bytes separately …
- Machine Learning Fundamentals
… a model that calls every transaction legitimate may be 99% accurate and still catch no fraud. Precision asks …
- Real-Time, Pub/Sub, Webhooks and CDC
… If you crash in between, the event is lost forever. ✅ Right: in one database transaction (an all-or …
- Payment Retries: Prevent Duplicate Charges
… A database transaction (an all-or-nothing group of changes) cannot include a call over the network to …
- Month 4: RAG and Knowledge Systems (Weeks 13-16)
… Because you already know Postgres, you get joins, transactions, backups and row-level security for free. - Indexes : HNSW …
- Running Kafka in Production: The DevOps View
… 3 KAFKA TRANSACTION STATE LOG REPLICATION FACTOR: 3 KAFKA TRANSACTION STATE LOG MIN ISR: 2 KAFKA AUTO CREATE …