API Design

API design is where solution architecture meets implementation. This section covers the constraints and trade-offs that define distributed system behavior.


What’s Here

Distributed Systems Theory

API Design Patterns


Key Trade-offs

CAP Theorem:
 CP systems: block on partition (Zookeeper, etcd)
  AP systems: serve stale on partition (Cassandra, DynamoDB)

PACELC:
  When there's no partition: do you prefer low latency or strong consistency?

Quick Reference

TopicKey Question
cap-theoremCan I have both consistency and availability during a network partition?
concurrencyWhat concurrency model fits my team’s skills and language?
stateful-vs-statelessShould my service hold state or delegate to a backing store?
12-factor-appDoes my app follow cloud-native principles?