I’m not sure if fly would be a good solution for this or not. We are building a solution that will require running a command on a server that could take 1 second to 10 minutes or so to execute. Is it possible with Fly either via API or CLI to open essentially infinite instance in parallel to run these commands and then terminate the instance once its completed? they would all use the same image, just have a different parameter passed to the command. It is kind of a queue processing, but can’t use workers that can get hung up making other workers wait because some of the “jobs” are so long running. So looking for a solution that doesn’t require pre-provisioning resources
If you create infinite resources you’ll trigger another global outage for the rest of us. (This was what happened in the last outage, sort of.)
How many instances are you expecting to trigger in your bulk processing.
in theory would need to be able to run hundreds in parallel . so i’m guessing fly may not be the solution i’m looking for
Fly Machines can definitely be used for ephemeral tasks like this. However, whether this will work well for you really depends on what “essentially infinite instance” actually entails. If your workload is not location-sensitive (as in, you can run the task pretty much anywhere in any region we provide), and you don’t require large machine sizes, hundreds of worker machines in parallel should not be a problem for us at all.
Although, to prevent runaway Machines API invocations and unexpected charges, we do put a default limit on the number of machines each organization can create. If you do decide to go this route, this limit can be lifted by contacting support. I’m sure support would also be happy to chat about architecting this kind of workload for best performance on Fly.
(And no, rest assured you won’t create a platform-wide outage by merely creating a lot of machines )