I’ve read the docs and all the nice ways to do scaling. However, amidst all the options I find myself still missing what I’d really prefer. What I need (for example) is a way to tell fly to run 3 instances of my app in this fra
, and 5 in ewr
, thats it, just a fixed setting. Let me explain why all the scaling options do not work for me:
Count Based Scaling
This doesn’t work for me because it evenly distributes all my instances across all my regions. However, I have more users in some regions so I’d like to tip the scales that way. My traffic is not super bursty so I’d like to just set some numbers in those regions. I had actually been using count scaling and just have the same number of servers in all my regions, but I just had a deployment “fail” in an interesting way. After a deployment, I had my 2 app instances sent to one region as opposed to evenly spreading it out. This incited a bit of panic as I scrambled to figure out why I lost service in one geo. Deploys should be deterministic, I should not feel like Im rolling the dice whenever I do a deploy. I think what happened here is that during the deployment it chose one geo and a backup region in that geo, and completely knee-capped my other geo.
Anchor Scaling
This is supposed to be the de-facto option if you want to specifically set instance counts in specific regions. However, I find it to be a very scary and confusing option for a live app. For instance I once tried deleting the volume to go back to count based scaling and my entire service went down (granted this was also my fault for deleting a live mounted volume). Also I had count based scaling, so I had lets say 6 instances of my app running in 3 geos. As soon as I pinned the app to the first volume I lost ALL the other apps running in other geos. It wasn’t obvious if there was a way to preserve my apps in all regions while I enabled this option. Also its not exactly clear how this option deals with backup regions. What if I pin to a region that is not able to bring up my server at deploy time but I have no volumes in the backup regions?
It also feels odd to have to attach a volume in order to specify scaling options, why can’t I just tell fly where to run the instances?
Autoscaling
This option seems fine, but again I personally prefer to just provision the capacity I need in regions I care about. Again, here the baseline is that all instances are evenly distributed across all regions in my list. Which I do not want.
I hope some of the explanations above help. I think I am good for now (except for the fact that count based scaling did the wrong thing when I last deployed), however I’d appreciate some comments to help me understand why there isn’t an option to just say where to deploy instances and how many.