Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Wrapper for distributing requests between nodes round-robin style #159

Open
todofixthis opened this issue Feb 20, 2018 · 1 comment
Open

Comments

@todofixthis
Copy link
Contributor

todofixthis commented Feb 20, 2018

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 😸

@todofixthis
Copy link
Contributor Author

Related: #160

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant