Every ML system design balances five core objectives. Your design choices prioritize some over others depending on the use case.
The ability to handle growing data volumes, request rates, and model complexity. Measured by throughput (requests/second, predictions/hour) and data throughput (GB/hour through the pipeline).
End-to-end response time from request to prediction. Critical for real-time applications.
| Application | Latency Target |
|---|---|
| Real-time fraud detection | <100ms |
| Recommendation serving | <200ms |
| Chatbot response | <1s |
| Batch predictions | Minutes—hours |
Latency is budgeted across components: network → feature fetch → inference → post-processing.
Measured by uptime percentage and prediction quality consistency. Includes fault tolerance (graceful degradation when components fail) and accuracy stability (model quality does not degrade over time).
The ability to respond to changing conditions: data distribution shifts, new user behaviors, business requirement changes.
Increasingly non-negotiable for regulated industries. Explainability means understanding why a model made a particular prediction. Fairness means ensuring the model does not discriminate against protected groups.
# Example: fairness monitoring
Group A (majority): approval rate = 72%
Group B (minority): approval rate = 68%
Disparity: 4% → acceptable (threshold: 5%)
If disparity > 5%: alert for investigation