How to protect a system from replay attack when designing a public REST API?
Python
What is the difference between the locking strategies SELECT ... FOR UPDATE and SELECT ... FOR SHARE? Describe a practical case for each.
What is the difference between asyncio.gather and asyncio.as_completed? In which situations is one method preferable over the other?
What is the 'index bloat' problem in PostgreSQL, why does it occur due to MVCC mechanics, and how to deal with it?
How does the CQRS (Command Query Responsibility Segregation) pattern differ from the traditional CRUD architecture? When is its implementation justified?
How is the mechanism of Context Variables (contextvars) organized and why does the usual threading.local not work inside asyncio coroutines?
What is a non-repeatable read anomaly and at what minimum transaction isolation level does it completely disappear in PostgreSQL?
Describe a scenario where Python's garbage collector cannot automatically delete objects from memory, even if there are no more references to them in the code.
What is a Server-Side Request Forgery (SSRF) vulnerability and how should a backend developer validate incoming data to prevent it?
How to design a distributed lock using Redis? What edge cases should be considered to avoid race conditions?
What is Amda's law and how is it applied in evaluating the efficiency of backend scaling?
Опишите разницу между стратегиями доставки сообщений at-least-once и exactly-once в брокерах, например Kafka. Какие требования это накладывает на Python-бэкенд?
What is the internal mechanism of the async and await keywords in Python? What happens at the generator level?
How does the Outbox Pattern help ensure that a message in a message broker like RabbitMQ is sent only if the transaction in the relational database has completed successfully?
What is the difference between stateful JWT-based authorization with token blacklists and stateless JWT? What are the trade-offs in security and performance?
How can one write a custom metaclass that automatically adds a prefix to all methods of the created class?
How to architecturally solve the problem of write amplification (excessive disk writes) when using NoSQL databases under high update intensity?
Imagine a situation: a heavy analytical query SELECT COUNT(*) FROM large_table is executed in PostgreSQL. Will an index on the primary key help speed up this query? Why?