Back to problems

Query System — Time + Geo Filtered User Activity

System Design · Airbnb · Hard

Requirements Functional Provide a query interface: (user_id, start_ts, end_ts, geo_bbox) → list of search and booking events. Support region- and time-bucket-based aggregates, including event counts and total monetary amounts. Non-functional The platform must retain historical data at a scale of tens of terabytes. A common query—one user, a one-week range, and a country-scale bounding area—should return in under one second; broad analytics scans may take several seconds.…

Checking your access…