The latest feature for Fly is now available and it’s…. a pause for your applications. And a matching resume, of course.
What’s a pause for?
When you start building your applications, there may come a point where you don’t want to keep your application running - mothballing while another project happens, schedule delays, or just plain wanting to manage your costs.
flyctl suspend comes in. It’ll take your application, save its state, and then reduce its running instances to zero. What doesn’t go away are the networking configuration, IP addresses and certificates, which are maintained in the background. Think of it as a deep freeze for your application. That means everything is ready to resume with the least amount of fuss.
Ready to resume
When you are ready to come back online,
flyctl resume will bring your application back to life. It does it carefully though, bringing just one instance back, even if the application was originally deployed across multiple regions.
It does this by starting with a scale minimum count of 1. You can use
flyctl scale set min=n to scale it back up, where n is, typically the number of regions in your region pool. And you can see that by running
flyctl regions list.
regions command has also had an enhancement with the addition of a
set command. If you found adding and deleting regions to get to your desired region pool was a chore, this new command will be a timesaver. Just enter your desired region pool and
set will take care of it.
Status of Play
flyctl has long been able to list the applications under your account. Now that you can pause applications, you also need to be able to quickly see what state all of your applications are in. So we’ve fixed that by adding the application’s current status to the results.
Open for Applications
Finally, we noticed that when users deploy a Fly application, the first thing they do is look up the application’s host name, open up their browser and browse to that hostname. Well, that’s something we could add a shortcut for.
Say hello to the new
flyctl open command which takes the current application and, assuming it’s been deployed, opens your web browser and navigates to the application’s hostname.
Updated Oct 29 2020 to use suspend/resume commands