Basic configuration
Setstrategy.mode to "fallback" and list your targets in priority order. The first target is tried first; subsequent targets are used only if the previous one fails.
Triggering conditions
By default, a fallback is triggered when the current target returns any error response. You can restrict fallbacks to specific HTTP status codes usingstrategy.on_status_codes:
When
on_status_codes is set, errors with codes not in the list propagate immediately to the caller — the gateway will not attempt the next target.