Fly machines scale out in multi region

I have a fly app deployed in 4 locations, LAX, SEA, SIN and NRT. Default is 2 machines in each locations with minimum machine set to 1. I can see that I get 1 LAX and SEA usually running which is fine with LAX being primary location. Now my question is if I have enough traffic for both machines in LAX and SEA to be active will fly proxy route request to SIN or NRT to scale out or will hit the ceiling at 4 machines with the other 4 never receving any request ?

Hey @dar

The Fly Proxy load balances requests to your app using both load and closeness. Ideally any request coming in will go to the least loaded, closest Machine to the user.

If a Machine reaches its hard_limit for concurrent connections (as configured in your fly.toml), then Fly Proxy won’t route requests to it at all until requests drop below that hard limit again. You can read more about load balancing in the docs, and this recent post about why new apps have an unlimited hard limit.

What I think you’re asking though, is whether a hypothetical user in Los Angeles will still be able to access your app if all your US west coast Machines are at or above their hard limit and not taking any requests? The answer is that they’ll still be routed to NRT or SIN, whichever is fastest; Fly Proxy will always consider all your app’s Machines when routing requests.

Since having stopped Machines is pretty inexpensive, you can assess where your app’s traffic is coming from and create more Machines in any region you want. Kudos for considering app availability in each of your regions with at least 2 Machines already though!

Thanks Andie

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.