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 is a message queue, and when should backend processing be moved into an asynchronous queue?JuniorA 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 service saves an order to the database and then publishes an "order created" event to a message broker. What problems can come up here, and how do you solve them?Mid-levelСервис заказов после оплаты кладёт событие в очередь, а сервис уведомлений его читает и отправляет пользователю пуш. Какие гарантии доставки бывают, почему пользователь может получить пуш дважды или не получить вовсе, и как это чинить? И как вы гарантируете порядок событий одного заказа?Mid-levelDesign a notification service that, based on events from other services, sends users email, push notifications and SMS, at up to several million notifications a day.Mid-levelAfter writing an order to the database, a service has to publish an event to a message broker. How do you guarantee the event isn't lost and that redelivering it doesn't duplicate the effect?SeniorHow do you test a service that processes events from a queue, for example from Kafka, and how do you deal with asynchrony in automated tests?SeniorDesign a notification service for push, email and SMS, handling about fifty million notifications a day, with spikes during marketing campaigns.Senior