Systems Engineering
Understand a production system from its architecture and communication contracts to distributed execution, deployment, telemetry, and recovery. Worked examples connect services, queues, caches, search, and Kubernetes to their guarantees and failure modes. Streamflow supplies infrastructure examples; the companion model platform supplies design reviews, deployment exercises, and incident drills.
66 sections
Start readingGlossaryContents
Section titled “Contents”Design and communication
Section titled “Design and communication”Data and execution
Section titled “Data and execution”- 7.1 The append-only event log
- 7.2 The workflow service
- 7.3 The task queue
- 7.4 The task protocol and workers
- 7.5 Activities
- 7.6 Deterministic replay
- 7.7 Durable timers
- 7.8 Signals, cancellation, and sagas
- 7.9 Subprocess activities: the Go runner and the Python helper
- 7.9.1 Process contract and recovery
- 7.9.2 The Go subprocess runner
- 7.9.3 Python helper and exporter
- 7.9.4 Failure tests and integration
- 7.10 Raft high availability for the durable log (optional)
- 7.11 Platform workflows: TrainRun and EvalSuite
- 7.12 ModelRelease: gates, canary, burn check, and rollback
- 7.13 Kafka consumer groups
Deploy and operate
Section titled “Deploy and operate”- 10.1 Tracer deploy: images, a kind cluster, two Helm charts, and Jaeger
- 10.2 Dockerfiles for the gateway and the engine
- 10.3 kind cluster, local registry, and port mappings
- 10.4 Helm charts and the observability stack
- 10.5 The Tilt dev loop
- 10.6 CI for the platform repo
- 10.7 Durable and worker images and charts
- 10.8 The agent image and chart
- 12.1 First drill: the engine crashloops
- 12.2 A decode worker dies mid-stream
- 12.3 The durable server is SIGKILLed in a loop during a corpus build
- 12.4 A poison task lands in the dead-letter queue
- 12.5 The KV format v2 migration
- 12.6 The API v2 migration
- 12.7 A breaking dependency upgrade
- 12.8 A performance regression bisect
- 12.9 A data incident
- 12.10 A noisy neighbor
- 12.11 A runaway agent
- 12.12 The event log disk fills up
- 12.13 A Raft partition (optional)
Appendices
Section titled “Appendices”What you will be able to do
Section titled “What you will be able to do”- Derive a design from access patterns, scale, consistency, and failure requirements, then defend its tradeoffs.
- Choose protocols, streams, queues, caches, and indexes by their guarantees and measured behavior.
- Design durable execution with explicit retry, cancellation, and recovery semantics.
- Deploy services reproducibly and connect telemetry to SLOs and diagnosis.
- Predict failures, test recovery, and explain what the evidence establishes.
Ways through this book
Section titled “Ways through this book”Work one chapter at a time, allowing extra time for experiments. The three parts cover design and communication, data and execution, and deployment and operations; the Apache ecosystem is an appendix.
- Designing services: begin with System Design, Software Architecture, RPC and Protocols, and Streaming. State each interface’s invariant and predict its failure behavior.
- Distributed execution: follow Messaging, Distributed Data and Caching, Durable Orchestration, and Search and Indexing. Compare consistency, replay, retries, and idempotency across the examples.
- Operating a platform: read Cloud Native Architecture, Kubernetes Workloads and Deployment, Observability, and Incident Response and Recovery. Finish with the Event API case study, demonstrating duplicate delivery and restart recovery.
- The whole book: follow the thirteen chapters in order. Use The Apache Ecosystem to locate specific projects. Defend a design, demonstrate a controlled failure, and report the limits of your checks.
Before you start
Section titled “Before you start”Be comfortable with programming, Linux basics, and data structures from Programming and Algorithms. Its Containers and Kubernetes primer prepares you for deployments.
Software Engineering covers testing, patterns, authorization, diagrams, and runbooks. Data Engineering covers pipelines and analytical data. AI Engineering applies systems mechanisms to models, gateways, and agents. These books link to the general systems chapters here.
Reference implementations and operational examples live in course/solutions/. How to read these books explains the shared method.