Design Real-Time Auctions for Social Posts
MetaSoftware Engineer · OnsiteLast updated
This question evaluates skills in designing scalable, low-latency real-time systems, including distributed architecture, concurrency control and ordering, data modeling, API design, and fault-tolerance for high-contention auction workloads.
Design a real-time auction feature for a large social photo and video app. A creator can attach an auction to a post. Viewers can place bids, and everyone watching the auction should see the current highest bid with low latency. The system must handle normal auctions as well as celebrity auctions where a large number of users bid at the same time.
Cover functional requirements, non-functional requirements, APIs, data model, high-level architecture, bid ordering and concurrency control, real-time highest-bid updates, scaling for hot auctions, and failure handling. Pay special attention to why pessimistic locking or single-writer serialization may be preferable to optimistic locking for highly contended celebrity auctions.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.