The core problem is that your largest customer, Northwind Logistics, spikes their traffic beyond their contracted Requests Per Minute (RPM) between 02:00-04:00 UTC. You must resolve conflicting stakeholder instructions explicitly and ensure the system behaves correctly at the boundary conditions.
(Explaining the Project): "My flight booking platform is a containerized application designed to handle high-concurrency reservations. Rather than a basic CRUD app, I built a transactional system featuring a custom digital wallet (Wallet.js) for user balances and a dedicated PricingLog.js architecture to track volatile fare changes and maintain an immutable audit trail. The entire environment is orchestrated with Docker Compose to ensure strict parity across deployment stages."
AI Interviewer (The Interruption): "I notice you built this transactional and financial ecosystem using the MERN stack (MongoDB, Express, React, Node.js). Relational databases like PostgreSQL are traditionally preferred for financial ledgers due to strict ACID compliance. Why did you choose MongoDB for a platform handling digital wallet deductions and concurrent seat inventory?"
(Defending the Tech Stack): "That is a great callout. While PostgreSQL is the gold standard for traditional ledgers, I deliberately chose Node.js and MongoDB for two specific reasons:
Asynchronous I/O for Read-Heavy Traffic: A flight platform is heavily skewed toward reads (searches) versus writes (bookings). Node's event-driven architecture handles thousands of concurrent search requests without thread-blocking.
MongoDB's Multi-Document Transactions: Since MongoDB 4.0, it fully supports distributed multi-document ACID transactions. I utilized session.withTransaction() to ensure that deducting funds from the Wallet and decrementing seat count on the Flight occur atomically. If either fails, the entire operation rolls back. Additionally, MongoDB's flexible schema allowed me to efficiently append unstructured historical data into the PricingLog without rigid migrations."
AI Interviewer (The System Design Pivot): "Understood. Let's pivot to a broader architectural scale. System Design Question: Imagine your flight booking platform goes viral during a holiday flash sale, scaling to 10,000 concurrent users searching for the same popular routes. How would you design a distributed caching layer and locking mechanism to ensure ultra-low latency for search queries while mathematically guaranteeing that no two users can double-book the last available seat during checkout?"
Will be conducted on 30th