2.4.3 · Lesson 18 of 25
Resilient FM Systems
AI APIs can fail.
Overview
AI APIs can fail.
Possible failures:
- timeout
- throttling
- service unavailable
- network errors
- model errors
- dependency failure
A resilient architecture should handle them.
Exponential Backoff
Instead of:
Fail → immediately retry Fail → immediately retry Fail → immediately retry
use increasing delays:
Attempt 1 → fail ↓ wait ↓ Attempt 2 → fail ↓ wait longer ↓ Attempt 3
The AWS SDK can support retry strategies including exponential backoff.
Rate Limiting
Protect the API/model from excessive traffic.
1000 requests
↓
Rate Limiter
↓
Allowed requests
↓
FMAPI Gateway can participate in traffic management/rate-limiting patterns.
Fallback
If the primary model fails:
Primary FM
↓
Failure
↓
Fallback FM
↓
ResponseOr:
Primary AI unavailable
↓
Graceful degradation
↓
Reduced functionalityX-Ray
AWS X-Ray can help trace requests across service boundaries.
Example:
Client ↓ API Gateway ↓ Lambda ↓ Bedrock ↓ Database
X-Ray helps identify where latency/failure occurs.
Key points
- timeout
- throttling
- service unavailable
- network errors
- model errors
- dependency failure
- Exponential Backoff
- Rate Limiting
Exam focus
Know when and how to apply Resilient FM Systems in production GenAI implementations.