I have an envoy proxy in front of a Next.js application and a Go server so that they appear from the same origin. The envoy proxy is routing properly but the number of applications isn’t increasing and it’s overloading just one server (specifically with next.js).
How does Fly Proxy load balance between the different machines? Does it route all traffic coming from the same source to the same machine?
Hi… Machine-to-Machine load balancing and auto-scaling are only done on the Flycast network, and not on the .internal addresses. That’s the main thing that trips people up.
If you haven’t already, try assigning Flycast addresses to the Next.js and Go applications—and then route to port 80 on .flycast instead of port 8080 on .internal.
Thanks for the additional details… I think you want an explicit [http_service.concurrency] section for this, tuned to the limits of your specific servers.
You can verify the current settings via fly m status -d, under "concurrency".