Menu

1 / 5

Backend Interview Question: Two Buyers Want the Last Seat. Who Gets It?

DEV Community: database·Emily Woods·about 15 hours ago
#tqsBm6iV
#devtodatabase#devto#dev#seat#buyer
Reading 0:00
15s threshold

A small PostgreSQL example, a deliberately broken timeline, and the follow ups that turn a working demo into a defensible answer.

Both buyers saw the same available seat. Both clicked the button and both received a confirmation, and now somebody has a very awkward email to write.

Nothing about this requires a million requests per second. Two requests arriving in the wrong order are enough.

That is why I like this backend practice problem. You can draw an impressive architecture around it, but eventually somebody has to explain which operation is allowed to say that seat A7 belongs to one buyer.

Let’s work through an original interview style exercise, without pretending it came from a particular company. We control the inventory, use one PostgreSQL database for claims, and start with a single seat for a single event.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.