Loading...
Number of Requests:
Data Storage:
Bandwidth:
GET /weather/current
GET /weather/current?location={city_name/coordinates}json
Copy code
{
"temperature": "25°C",
"humidity": "60%",
"wind_speed": "10 km/h",
"description": "Partly cloudy",
"location": "New York, USA"
}
GET /weather/forecast
GET /weather/forecast?location={city_name/coordinates}&type={hourly/daily}json
Copy code
{
"forecasts": [
{"time": "2024-10-23 12:00", "temperature": "20°C", "condition": "Sunny"},
{"time": "2024-10-23 13:00", "temperature": "21°C", "condition": "Sunny"}
]
}
Weather Request Flow:
Weather Alert Flow:
SQL vs. NoSQL: Chose NoSQL (e.g., DynamoDB) for scalability and high throughput with real-time data. NoSQL is ideal for handling high volumes of weather updates.
Cache (Redis): Used to minimize database load and reduce response times for frequently requested data.
Pub/Sub for Alerts: Chose Pub/Sub architecture to decouple the alerting system from the main weather data processing pipeline, allowing it to scale independently.