Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when designing large-scale systems, choosing between architectural patterns, evaluating trade-offs, designing for scalability and reliability, or preparing for system design interviews. Trigger on keywords: system design, architecture, scalability, microservices, monolith, distributed system, design trade-offs, high availability, load balancing, caching strategy, database selection.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-20 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 253% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 60% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 77% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 75% | 0% |
Before designing anything, answer:
Functional: What does the system do? Scale: How many users? Requests/sec? Data volume? Growth rate? Availability: What's the acceptable downtime? (99.9% = 8.7h/yr, 99.99% = 52m/yr) Latency: What's the acceptable response time? (p99) Consistency: Strong vs eventual consistency? (CAP theorem) Read/Write ratio: Read-heavy? Write-heavy? Mixed? Geography: Single region? Global? Data sovereignty requirements?
| | Vertical | Horizontal | |---|---|---| | Method | Bigger machine | More machines | | Limit | Hardware ceiling | Theoretically unlimited | | Cost | Expensive | More cost-efficient | | Downtime | Required | Zero downtime possible | | Complexity | Simple | Requires load balancing, distributed design |
Default: design for horizontal scaling from the start.
| Layer | Tool | What to Cache | |---|---|---| | CDN | Cloudflare, CloudFront | Static assets, public API responses | | Application | Redis, Memcached | Session data, computed results, DB query results | | Database | Query cache, materialized views | Expensive aggregations |
Cache Invalidation Strategies:
| Use SQL When | Use NoSQL When | |---|---| | Data is relational | Data is unstructured or variable schema | | ACID transactions required | Horizontal scaling is priority | | Complex queries and joins | High write throughput needed | | Data integrity is critical | Eventual consistency is acceptable |
Partition data across multiple databases:
| | Monolith | Microservices | |---|---|---| | Complexity | Low (operational), High (code over time) | High (operational), Lower (per service) | | Deployment | Simple, all-or-nothing | Complex, independent per service | | Scaling | Scale everything together | Scale services independently | | Team size | Small teams, early stage | Larger teams, mature product | | Start with | ✓ Yes | Only when monolith pain is real |
Rule: Start monolith, extract services when you feel the pain. Premature microservices is a common mistake.
Use when:
Tools: Kafka (high throughput), RabbitMQ (complex routing), AWS SQS (simple, managed)
Separate read and write models:
Good for: high read/write ratio disparity, complex domain logic
| Requirement | Pattern | |---|---| | High Availability | Redundancy, failover, multi-region | | Low Latency | CDN, caching, read replicas, edge computing | | High Throughput | Horizontal scaling, async processing, queues | | Consistency | ACID transactions, consensus protocols (Raft, Paxos) | | Durability | Replication, backups, write-ahead logs | | Security | Auth, encryption at rest + transit, least privilege |
For every design decision, explicitly state the trade-off:
Decision: [what you chose]
Why: [what problem it solves]
Trade-off: [what you give up]
Alternative: [what you considered]
When to reconsider: [conditions that would change this decision]Useful numbers:
Other measured skills in the registry, with their headline benchmark lift.