Autoscaling characteristics for v2 apps

Hi

Background
I have a client whos site usually only get moderate traffic, but every other week or so they do marketing email sendouts (which seems to be very popular) and within minutes they get a huge amount of traffic hitting the sites. I’ve been having issues finding a good balance of the nr of machines to have running for them, so was looking at this documentation Automatically stop and start Machines · Fly Docs. The idea of having just 1 machine running normally and then many more stopped machines waiting to jump in when traffic increases seems that it should work.

Question
Since traffic increase in my scenario is very fast (going from 10 req/min to several hundred within 1 minute). How fast does the autoscaling of v2 app happen (excluding start time of app itself). e.g. can i expect it to scale from 1 running machine to 5 within the course of 1 minute if there is enough traffic?

Thank you in advance and for making a great product.

1 Like

Hi there! I believe a combo of load balancing settings an auto start/stop might be enough for you. Ill link you a doc and also give a quick explanation:

But the tl’dr is that you can leave min_machines_running = 1 to ensure your primary region machine is always awake when regular traffic is happening. You’d want to figure out a soft_limit that our proxy can use to say “hey they reached the soft limit, time to start other machines” and make sure to leave enough machines to handle your desired top traffic (several hundred per minute).

Thanks for the information. I’ll experiment with the soft_limit setting.

Follow up question. When inspecting the traffic in grafana does the “App concurrency” in this screenshot

refer to number of connections if I have the setting type = "connections" or does it refer to number of requests?

Yes

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