This repository was archived by the owner on Jan 13, 2023. It is now read-only.
This repository was archived by the owner on Jan 13, 2023. It is now read-only.
Wrapper for distributing requests between nodes round-robin style #159
Open
Description
Implement an adapter wrapper that, given a collection of AdapterSpec
objects will route each API request in a round-robin fashion.
If a connection failure occurs (e.g., timeout or connection refused) or if the client receives a 5xx response (e.g., 500 or 503), then the wrapper should automatically try to switch to the next one. If every connection fails, then raise an exception. Note that this does not apply when the client receives a 4xx response (this indicates a problem with the request, not the node).
Bonus points if you can make it thread-safe, but it's not a requirement. To be honest, I'm not even sure if "thread-safe round-robin" even makes sense 😸