Middle
There is a possibility that system B may be unavailable during a request for generation. How to bypass?
sobes.tech AI
Answer from AI
If system B may be unavailable during a generation request, several approaches can be used to ensure resilience:
- Exponential backoff retries: retry requests with increasing delays to give the system time to recover.
- Caching: store the last successful results or templates to use when unavailable.
- Message queues: send requests to a queue that system B will process asynchronously, reducing dependency on immediate availability.
- Fallback logic: provide alternative generation paths or simplified options if the main system is unavailable.
- Monitoring and alerts: quickly respond to failures and minimize downtime.
For example, if generation is creating a report, requests can be stored in a queue and processed when system B is available again, notifying the user of the result readiness later.