System Design: Online Auction & Bidding Service (with FAANG Senior Engineer)

preview_player
Показать описание
FAANG Senior Engineer deep dives system design for the online auction & bidding service interview question

Common names for this problem:
- Online Auction
- Bidding Service

Examples of real world implementations of this:
- Ebay

Request other problems for me to cover here:

Here's a link to our discord channel where I organize the live discussions every weekend:

Originally recorded 11/19/2022

#systemdesign #programming #technology
Рекомендации по теме
Комментарии
Автор

I used this design in my interview and got rejected. Particularly from the feedback: Designing an auction (closed) - was not providing the right solution. LOL

ThunderboltF
Автор

Great video, Instead of a cron, You can drop an event with delivery time as current time and deadline, it will delivery the message to the consumer at that time and it can close the auction and do the necessary stuff.

VijayJain
Автор

what about concurrency. If two bids come in at the same time from 2 different clients for the same price, the nosql bid data store would accept both, as there is no concept of Serializable isolation there. We need consistency over availability here and i believe rdbms would be better at dealing with transaction isolation Serializable isolation to handle phantom records

gurjarc
Автор

In the fixed deadline case, how would you prevent clients from just submitting new bids? You can't depend on client-side clocks for this. There's of course a server-side part in this where you just don't accept bids that arrive too late. But to make it a fair auction, I think we need something that also distributes 'time-left' stamps to participating clients. Maybe the auction-closing-service that was suggested can publish countdown events to Redis pub/sub so participating clients have the same notion of 'time left to place bids'?

RonaldWildenberg
Автор

when the #bids are in high volume, the Auction Closing Cron Task might not be keeping up with the traffic. And this polling based like solution would cause bids not close in time. Would using scheduler a better approach? when placing a bid, also set up a scheduler for the bid. (If the old bid is beaten by a new bid, remove the old scheduler set on the old bid, and set up new one).

浮游-wv
Автор

I kinda feel the system design interview has a lot of wiggle room. The ambiguity often comes from the question itself. Whether your answer is correct or not depends on the vibe between you and the interviewer.

ThunderboltF
Автор

why not make a auction closing service instead of cron task?

saber
Автор

Thanks for sharing this video. Could you also share your thoughts on scenarios when two users can bid at the same time? And if the proposed approach is good in scale?

KarmaRyder
Автор

what is the reason using dynamodb / cassandra instead of mySQL?

pengchen
Автор

Thanks for the video but I'm not satisfied with the approach. lot of details are missing/wrong, used all types dbs ( sql, no sql, cache, pub sub) for simple problem. basic question was unanswered: how do you ensure that auction will close as soon as there is no update in last 60min? I don't see any timer being used to ensure that. so many "may be's", "I guess" makes reader less confident in your approach, please do home work before explaining. you should use some kind of event system or timer system that notifies your system after 60 mins. Looking forward for more videos.

muraliable