You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

139 lines
5.9 KiB

[
{
"id": "url-shortener",
"name": "URL Shortener",
"description": "Scale your URL shortener to handle traffic spikes and ensure high availability.",
"targetRps": 1000,
"durationSec": 180,
"maxP95LatencyMs": 150,
"requiredAvailabilityPct": 99.9,
"mustInclude": ["database", "loadBalancer"],
"encouragedComponents": ["cache"],
"hints": ["Consider caching and horizontal scaling."],
"interviewerRequirements": [
"The service should handle traffic spikes gracefully.",
"Shortened links should resolve quickly under moderate load.",
"Ensure no single point of failure in the redirect path."
],
"functionalRequirements": [
"Must include a database and a load balancer",
"Encouraged to add a cache in front of the database"
],
"nonFunctionalRequirements": [
"Target RPS: 1000",
"Max P95 latency: 150ms",
"Required availability: 99.9%",
"Simulation duration: 180 seconds"
]
},
{
"id": "chat-app",
"name": "Chat App",
"description": "Support real-time chat across mobile and web, with message persistence.",
"targetRps": 500,
"durationSec": 300,
"maxP95LatencyMs": 200,
"requiredAvailabilityPct": 99.9,
"mustInclude": ["webserver", "database", "messageQueue"],
"encouragedComponents": ["cache"],
"hints": ["Ensure you decouple frontend from persistence."],
"interviewerRequirements": [
"Messages must be delivered in order and reliably across multiple clients.",
"Frontend and backend should be decoupled via an asynchronous system.",
"Messages should be persisted with low latency under load."
],
"functionalRequirements": [
"Must include a webserver, message queue, and database",
"Encouraged to use a cache to reduce database read pressure"
],
"nonFunctionalRequirements": [
"Target RPS: 500",
"Max P95 latency: 200ms",
"Required availability: 99.9%",
"Simulation duration: 300 seconds"
]
},
{
"id": "netflix-clone",
"name": "Netflix Clone",
"description": "Add video transcoding, caching, and recommendations.",
"targetRps": 1000,
"durationSec": 600,
"maxP95LatencyMs": 300,
"requiredAvailabilityPct": 99.9,
"mustInclude": ["cdn", "data pipeline", "cache"],
"encouragedComponents": ["monitoring/alerting"],
"hints": ["Think about asynchronous jobs and caching strategy."],
"interviewerRequirements": [
"Videos should be transcoded into multiple bitrates for adaptive playback.",
"Popular content should be cached to improve performance.",
"Users should receive basic recommendations based on view history."
],
"functionalRequirements": [
"Must include a CDN, cache, and data pipeline (e.g. for processing viewing logs)",
"Encouraged to include monitoring/alerting for system health"
],
"nonFunctionalRequirements": [
"Target RPS: 1000",
"Max P95 latency: 300ms",
"Required availability: 99.9%",
"Simulation duration: 600 seconds"
]
},
{
"id": "rate-limiter",
"name": "Rate Limiter",
"description": "Design a rate limiter that works across multiple instances and enforces global quotas.",
"targetRps": 1000,
"durationSec": 180,
"maxP95LatencyMs": 50,
"requiredAvailabilityPct": 99.9,
"mustInclude": ["webserver", "cache"],
"encouragedComponents": ["messageQueue"],
"hints": ["Consider Redis or distributed token buckets. Account for clock drift."],
"interviewerRequirements": [
"Rate limits must be enforced across multiple service instances.",
"State should be centralized or synchronized (e.g., using Redis).",
"System should recover cleanly from cache failures."
],
"functionalRequirements": [
"Must include a shared cache (e.g., Redis) for rate limiting state",
"Must include a webserver that respects global rate limits",
"Encouraged to queue burst traffic using message queues"
],
"nonFunctionalRequirements": [
"Target RPS: 1000",
"Max P95 latency: 50ms",
"Required availability: 99.9%",
"Simulation duration: 180 seconds"
]
},
{
"id": "metrics-system",
"name": "Metrics System",
"description": "Design a pull-based metrics system like Prometheus that scrapes multiple services.",
"targetRps": 1000,
"durationSec": 300,
"maxP95LatencyMs": 100,
"requiredAvailabilityPct": 99.9,
"mustInclude": ["data pipeline", "monitoring/alerting"],
"encouragedComponents": ["cache"],
"hints": ["Consider time-series indexing and label-based queries."],
"interviewerRequirements": [
"The system should pull metrics from external sources at regular intervals.",
"Collected metrics should be queryable using labels and timestamps.",
"Alert on metric thresholds (e.g., error rates > 5%)."
],
"functionalRequirements": [
"Must include a data pipeline for ingesting scraped metrics",
"Must include a monitoring/alerting component that triggers alerts based on thresholds",
"Encouraged to cache recently queried results for performance"
],
"nonFunctionalRequirements": [
"Target RPS: 1000",
"Max P95 latency: 100ms",
"Required availability: 99.9%",
"Simulation duration: 300 seconds"
]
}
]