(5 cars parking and departing/second) * 60 seconds * 60 minutes * 24 hours * 365 days * 5 years = 788 million
Assume every database entry is about 500 bytes = 394 GB
(10 users reserving/second) * 60 seconds * 60 minutes * 24 hours * 365 days * 5 years = 1.6 billion
Assume every database entry is about 500 bytes = 788 GB
The client will connect to a load balancer to balance the requests made to the server. Client will also connect to CDN to access static content for better performance.
The load balancer can direct to the server which points to different services. We will have the reservation service which will handle all reservations and payment related actions. We handle both in the same service so that if payment fails, reservations should also fail. We will store in the database that the user made a reservation.
If user arrives at the lot, the lot will access the CheckIn Service to check the user into the lot. If the user leaves the lot, the lot will access the CheckIn Service to check the user out of the lot.
Once user parks, the lot will access the Parking Service to mark in the database that the user has parked.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
Reservation Service
Parking Service
CheckIn Service
TradeOffs/Tech Choice: