11: Design TicketMaster/StubHub | Systems Design Interview Questions With Ex-Google SWE

preview_player
Показать описание
My front-end has been non-performant recently, could someone help me out and perform a heap dump on it?
Рекомендации по теме
Комментарии
Автор

Jordan you’re the sh*t bro thanks for taking the time out to create all these videos! This channel is by far the best resource I’ve found for system design.

landocodes
Автор

Bookmarks

3:45 Ticket claim approaches - no claim FCFS, with TTE, with TTE along with wait list [perhaps for all site like queueit]
7:45 Data partition
12:30 Claim expiration, fair claim etc

knightbird
Автор

Jordan, thank you so much for the uploads!! Appreciate all your videos !

DevGP
Автор

24:34 I thought about putting orders into a message que, but then, the clients can't receive an asap information whether they have claimed something or they are waiting in queue. If we do that as "Client -> ClaimService -> MQ -> DB" then ClaimService cannot tell the Client in real time what is happening with his claim after it publishes to the queue... or can it?

Great video Jordan as always!

Luzkan
Автор

I always wondered how airport seat reservations work under the hood. Now I do.
.
25:00 The queuing thing did not make much sense to me. People are queuing for any ticket a specific seat like C3? When you click on a specific seat for airplane, there is no queuing visible to the user.

herp_derpingson
Автор

Thanks dude for the videos. I just started with the system design 2.0 playlist and already learned a great deal.

shreekss
Автор

8:47 why do you need to partition for seats? assuming it's 60 seats per screen can't you just use one partition. I think it's more of a system where you have logged in users and assign a sort order among them based on seats selected, trust rating of the user (how likely are they to purchase once they select a seat) and other anti fraud detection because you don't want bad actors to just hold your system to hostage.

arvindgb
Автор

Hey Jordan, quick question about 34:35. If we were to write to the replica or kafka synchronously, is that considered a "two phase commit"? Or does that term only apply when we try to do a distributed transaction across two services, with a third service coordinating the process?

yiannigeorgantas
Автор

Ticket booking sites have waiting lists, but I've never seen one that has waiting lists for specific seats or rows. They have a waiting list (like a "deli ticket" system) *before* entering seat selection/checkout. Sometimes that's strictly FIFO, but in some cases you join a "lobby" and your position in queue is randomly or semi-randomly assigned when tickets go on sale. Buyers in the queue are then admitted to seat selection in batches.

The point of these systems is to reduce load on the seat selection and checkout systems. I.e to avoid the thundering herd you mentioned a few times. The question to ask is how do you design a system to handle extreme QPS peaks by spreading out the load over time.

The solution presented in this video where you shard by section or row doesn't really solve the hot shard or thundering herd problems.

Front-row center is always going to be the most popular row. At least if I understand your design correctly, all buyers will simultaneously enter seat selection at the same time. And most of those people are going to compete for the same most desirable seats. Those will be very hot shards, which hundreds of thousands of people will be hitting simultaneously for popular events.

Then once seats are selected, usually you have a few minutes to complete payment. So then you will have tens of thousands of people who managed to select seats hitting your payment systems at the same time.

Ynno
Автор

Awesome content again. Thank you for all that you do, Jordan!

siddharthgupta
Автор

Hi Jordan, how do you plan to invalidate a fencing token if no subsequent request comes in from the user? For example, if a user with userID 123 receives a fencing token like <123, 4:00> and then drops off, how would those reserved seats become available for someone else?

Do we need to have some sort of cron jobs in background to set those particular rows back to available ?

Adityaqk
Автор

The real answer is that I don't care at all about the high traffic scenario. That accounts for 1% of my total events, and those are so popular that 100% of tickets will be sold no matter what. It doesn't matter if the system is fair, of if the UX is terrible, or even if it goes down. That's just the difference between selling all the tickets in 1 minute and selling them all in 10 minutes. Same revenue. The important part is the UX for all the customers buying tickets to less popular events. If you put them off, you might actually fail to sell a ticket that you could have.

tfk
Автор

Love these videoes man, helping me crank up my growth trajectory

mohamedmacow
Автор

correct me if I'm wrong but we don't need serializable transactions for booking one seat itself(i am not talking about claiming e.t.c). if we have a lock. Let's suppose that you acquire a distributed lock when you try to create/update the booking. Even if you decide to have a separate payment entity, most probably you don't need to update the balance, only create it with a reference to the booking id enough. You are gonna use a 3rd party vendor to send the data, so if the data is successfully transferred you just commit the transaction. Atomicity is provided by default. There are no 2 users that can have a lock at the same time (provided by consensus algorithm), and you just release the lock when a transaction is committed.

ihor
Автор

Thank you for making these videos. They are very helpful. Would it be possible to make a video on monitoring as well? Or maybe introducing a monitoring setup in one of the applications? Thanks again!

MansiKishoreRanka
Автор

Hi Jordan. I am confused the concept of waiting for tickets. I took a look at the ticketmaster, a seat is either available or blocked, whether a use completes the payment or not. If the payment doesn't go through, the blocked seats are released for booking.
My question is why would a user want to wait on a seat for 10mins when the chances of getting it are slim? wouldnt he just look for different seats in different section. I dont get why this waiting for tickets feature exists at first place. What are we exactly trying to solve?

AjItHKuMaR-nsyu
Автор

Hey Jordan, really love your videos. Could you please attach the sources (if there are any) for videos that have " question specific" concepts like Fair claim implementations in this video, Route recreations in your Uber video etc...

fluffymattress
Автор

Hi Jordan. Could you please tell me how the reads would flow for a particular event. That is, when user logs in and searches for an event, how do we read for available seats? Does the request go to DB ( if so isn't the data stale as cache is current?), does it go to cache? ( if so, since each row is in different partition, do we need to query every row for an event and then aggregate???).
Thanks!

AjItHKuMaR-nsyu
Автор

Can you some tell me is this product design or system design? I'm very confused with meta
SD and PD

madhuj
Автор

Thank you so much for these videos. They are by far the best. A couple of questions, Can we CDC from a server, I see that in the final diagram? I thought we could have it only from database tables.
Also, when should we consider using an In-memory message broker instead of Kafka? In most of your videos, you have used Kafka.

sameer