Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
What's the difference between the HTTP methods GET, POST, PUT, PATCH and DELETE? And what does it mean for a method to be idempotent?JuniorA client sends a POST request to create a payment, the response never arrives because of a timeout, and the client retries the request. How do you make sure the money isn't charged twice?Mid-levelA daily pipeline loads yesterday's data into the warehouse. Sometimes it fails halfway through, and after a restart duplicates show up in the table. How would you redesign it?Mid-levelA queue consumer processes "award bonus points" messages, and sometimes users get their bonus twice. Why does this happen, and how do you fix it?Mid-levelA client calls your create-payment endpoint, the response is lost to a timeout, and the client retries the request. How would you design the API so the money isn't charged twice?SeniorСервис зачислений читает из Kafka события об успешных платежах и пополняет счёт клиента. Как вы гарантируете, что одно и то же событие не зачислит деньги дважды?SeniorWrite a handler for creating a payment that takes an idempotency key and the payment data and returns the result. A repeat request with the same key must not charge the money a second time, even if two identical requests arrive simultaneously on different instances of the service; you have a database and an external payment provider.Senior