Machine questions

Thanks for the repies!

Apps v2 (running on machines) will eventually be on par with Apps v1. Currently you need to scale manually yourself. I’ve seen discussions internally about figuring out how auto-scaling will work - it’s being thought on.

That’s good to know - I assume that’ll be a while before we get to that position though?

The Fly Proxy will load balance traffic across all Machine instances of an application within a region.

Is this for certain, now? See: Rolling my own autoscaling for Fly Machines - #4 by kurt

Yes in-fact this was one of the questions which triggered mine. So if 3 are within a region, it will load balance between them (assuming as distributed as it can be although I don’t have too much knowledge here), just not create new ones.

Updating a machine (by changing some parameter such as the image its based on, or scaling instance size) creates a new machine (replacing the old machine) and therefore can cause downtime during that period.

Thanks, thought as much. So I guess it is possible if you bring up a new machine, wait for to become live and bring down the old ones. This obviously adds a bunch of work as it needs to handle failures, tracking the state of machines and writing rolling update logic.

There is a chance a machine won’t be able to start. I think (but am not 100% sure) that you’ll get an HTTP error response if there is no capacity available when starting an existing machine (immediate feedback, vs something async).

Overall I think this is my biggest concern. Without Fly managing autoscaling (by resource), Machines don’t seem to be useable running unknown user code. If it were my own project with an insight into traffic & general resource requirements, I could provision as many machines as I think I’ll need. However, a FaaS model involves running users application code - their project could demand a lot of resource. The only ‘solution’ to this, is to create lots of machines which can scale to zero. However even then, it still might not be enough (or overkill for small projects).

Create a new machine instead of start an existing one

Doing this automatically doesn’t seem possible - I’d need to keep track of resources / machine states etc (at this point you’re starting to build your own orchestration service around Fly).


It seems like this project is only going to be viable on a “Fly Apps v2 with scale-to-zero and autoscaling”.