System Design: Weather Data Aggregation (10-minute Updates)
Context
Build a service that periodically fetches weather data from third-party providers for many cities/regions, stores and serves the data reliably, and scales with growth. Assume near–real-time use cases (dashboards, alerts, APIs) and historical analytics.
Requirements
Design and describe the following aspects:
-
Architecture and data flow end-to-end.
-
Scheduler that triggers updates every 10 minutes across many cities and providers.
-
Rate-limiting and quota management for third-party APIs.
-
Idempotency and deduplication across retries and providers.
-
Retry strategy, backoff, circuit breaking, and dead-letter handling.
-
Schema design for hot vs. cold storage and partitioning.
-
Caching strategy for read performance and cost control.
-
Data validation, normalization, and quality checks.
-
Multi-provider support, abstraction, and result blending/failover.
-
Handling provider outages and delayed/late-arriving data.
-
Monitoring, alerting, and SLOs.
-
Scalability across cities and regions, including capacity planning.
State any assumptions you need and justify key trade-offs.