Loading...
# Data model
# Capacity Estimation
100 Locations, 1000 spots / locations, 5000 bookings / day / location
=> # bookings / day = 100 * 5000 * 256 = 500K * 256 = 128M = 1.28 GB / day
=> 5 year = 1.28 * 360 * 5 = 2.3 TB => 3 TB
# DB design
GET /available_spots (location_id) -> Spot Count
POST /start_booking_spot (location_id) -> payment_url
POST /on_payment_success (payment_id)
POST /enter_spot (booking_id)
POST /leave_spot (booking_id)
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.