Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load balance client side #205

Open
jasny opened this issue Oct 20, 2021 · 0 comments
Open

Load balance client side #205

jasny opened this issue Oct 20, 2021 · 0 comments
Assignees

Comments

@jasny
Copy link
Member

jasny commented Oct 20, 2021

We're using a load balancer on AWS for nodes.lto.network. There've been issues where one of the nodes is still syncing, but already serving requests. Also the endpoint can simply be down.

Load balancing can be done in the client instead, choosing one of 3 nodes.

  • Pick a node at random. Use a cookie (1 day ttl) to prevent switching nodes unexpectedly
  • Check if the node is healthy via /index/health
  • If unhealthy, pick another node
  • If none of the nodes are healthy, display a message saying the service is currently unavailable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants