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

Issue with the "Load Balancing" doc RE: in-region loadbalancing #1746

Open
swilson-fly opened this issue Aug 9, 2024 · 2 comments
Open

Issue with the "Load Balancing" doc RE: in-region loadbalancing #1746

swilson-fly opened this issue Aug 9, 2024 · 2 comments

Comments

@swilson-fly
Copy link
Contributor

I found an issue with this document.

Title: Load Balancing
Location: https://fly.io/docs/reference/load-balancing/
Source: https://github.com/superfly/docs/blob/main/reference/load-balancing.html.md

Describe the issue

The Proxy as currently configured will avoid routing requests outside a given region until all machines in that region are over their hard_limit. The current examples state that we'll start routing to nearby regions once all machines in them are over the soft limit. This is incorrect!

This example section needs updating:

In this contrived example, all of the users are currently in Amsterdam, so the traffic is arriving at one of the Fly.io edges in Amsterdam. Here’s what happens as the number of concurrent HTTP requests from users in Amsterdam increases:

60 concurrent requests: Requests are divided evenly between the 3 Machines in the ams region. Closeness of the worker and edge will determine which of the 3 Machines each request goes to.
61+ concurrent requests: 60 of those requests will be sent to the 3 Machines in the ams region and the rest will be sent to the closest Machines in other regions.
200+ concurrent requests: All Machines are at their soft_limit, so Fly Proxy will start routing requests to the ams Machines again. For example, the 201st concurrent request will go to a Machine in the ams region that is currently at its soft_limit.
250 concurrent requests: All Machines are at their hard_limit. The 251st concurrent request will get queued by Fly Proxy until a Machine is below its hard_limit.

Addtional info

Doublechecking with the networking team to ensure that the change from what's documented was intentional. Once that's confirmed I can make a PR to update this

@swilson-fly swilson-fly changed the title Issue with the "Load Balancing" doc RE: in region loadbalancing Issue with the "Load Balancing" doc RE: in-region loadbalancing Aug 9, 2024
@andie787
Copy link
Contributor

andie787 commented Aug 9, 2024

Sounds good! Thanks for this!

@AshitaGK
Copy link

Any follow up on this?
Shouldn't Fly Proxy deprioritize/queue requests when all the Machines are above their soft_limit?

According to the documentation for Dynamic Request Routing, intro paragraph mentions that sometimes it’s useful or necessary to route requests to other regions, other apps or both.
Kindly clarify.

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

3 participants