1. The Universal Answer Shape
For most technical questions, this four-part structure works:
- Direct answer first (10–20 seconds). Answer the question asked, immediately. Interviewers frequently cannot tell whether a candidate knows the answer because the candidate spends ninety seconds on pre-amble.
- The reasoning (1–2 minutes). Why that answer, and how the mechanism works.
- The cost (20–30 seconds). What this choice makes worse. This is the senior marker. Almost every candidate can state a benefit; far fewer volunteer the cost
- The boundary (10 seconds). When you would choose differently, or what you have not addressed.
2. Example Answer
Question: "Should we use a message queue here?"
- Direct Answer: If a user is waiting on the response, making it async just hides the wait. For something like a confirmation email, yes: it must never block or fail the order, so a queue is right.
- Cost: I'm paying eventual consistency, a requirement that consumers be idempotent since delivery is at-least-once, and a monitoring burden — consumer lag, DLQ depth, and a redelivery story.
- Comparison:
- RabbitMQ & Kafka is still ok: If it's a command with one handler — 'send this email' — a work queue like RabbitMQ or SQS fits, and I get per-message retry and dead-lettering without head-of-line blocking.
- Must Kafka: If it's an event several teams may care about — 'order placed' — a log like Kafka fits, because consumers are independent and I can replay.
Criteria to care about:
- Scale
- Reliability
- Security
- Operation.