Diagrams as code for microservices
Draw systems by typing: architecture diagrams as code.
Write services and use cases as text. Proschi draws the diagram and plays every request through it.
- Build Design a system Type it, see the diagram, play the requests, test load and cost. Open the editor
- Practice Prepare for interviews 29 system design problems in 8 stages, each with a lesson, tests and a review. Start the roadmap
New to Proschi? 2-minute quickstart · How the roadmap works
- Free & open source
- No account needed
- Runs in your browser
title "Checkout"
web "Web Shop" [Actor]
group vpc "AWS VPC" {
api "Order API" [REST API] @orders
db "Orders DB" [PostgreSQL] @orders
}
events "OrderEvents" [Kafka] @platform
web -> api : HTTPS
api -> db : SQL
api -> events : publish
usecase "Place order" {
web -> api : POST /orders json {"sku": "A1"}
alt "Placed" {
api -> db : INSERT order
api ->> events : OrderPlaced {"orderId": "o-1"}
api --> web : 201 {"orderId": "o-1"}
} alt "DB down" {
api -x db : INSERT order
api --> web : 503 {"error": "retry_later"}
}
}
The editor, the diagram and the player load next.
Break it on purpose. Then test it.
Every alt is a way your system fails: watch the packet die at the database, not in production. Then check requirements,
traffic and capacity in your browser. Green means it holds up.
Break it
usecase "Pay" {
web -> api : POST /pay
alt "Paid" {
api -> db : INSERT payment
api --> web : 201
} alt "DB down" {
api -x db : INSERT payment
api --> web : 503 {"error": "retry_later"}
}
}
Test it
traffic {
"Redirect" 100k rps mix "Cache hit" 90%, "Cache miss" 9%, "Unknown code" 1%
}
requirements {
p99 "Redirect" < 100ms
availability "Redirect" >= 99.95%
survive any node failure
cost <= 5000 usd/month
}
Tests URL shortener example 5 / 5 pass
- p99 of Redirect < 100 msp99 of Redirect is 24.3 ms (limit 100 ms)
- availability of Redirect ≥ 99.95%availability of Redirect is 99.999999% (limit 99.95%)
- survive any node failureEvery use case keeps working after losing any of 4 nodes
- cost ≤ $5,000/monthTotal cost is $3,000/month (limit $5,000/month)
- Redirects are served from the cacheAll 6 assertions hold
For system design interviews
Interview prep roadmap
29 system design problems in 8 stages, from a URL shortener to ride matching. Each stage builds on the one before, the way interviewers expect you to reason.
- Lesson Explains the concepts the problem needs before you start.
- Challenge Design it hands-on; a simulation checks load, latency, failures and cost.
- Review Feedback on your design: what holds up and what to improve.
No account needed to start: browse every stage and work through the first one in your browser. Sign in if you want to keep your progress and go on.
The stages
- Foundations 5 problems
- Caching and the edge 3 problems
- Partitioning and replication 4 problems
- Queues and async work 4 problems
- Fan-out and real-time delivery 4 problems
- Streams and aggregation 3 problems
- Consistency and contention 3 problems
- Geo, media and hot spots at scale 3 problems
Practice system design
29 system design problems. Tests, not opinions.
Scale or Fail
The system design game: keep a system up while traffic grows, new use cases arrive and things break.
Free. Open source. No account.
Your diagrams never leave the browser.
Start typingOr open an example, break it, make it yours: