Fly Answers Questions - Suspend, Resume, Restart and Redis

Q: I’d like to park my Fly application for a little while so it isn’t consuming resources. How can I do this without destroying the application and redeploying it later? A: As you’ll have noticed, Fly applications stay running all the time ready to

Dj Walker-Morgan
3 min readbeginner
--
View Original

Overview

The article addresses common questions regarding the Fly platform, specifically focusing on how to manage applications using commands like suspend, resume, and restart, as well as discussing limitations of Redis support on Fly. It provides practical insights for developers looking to optimize resource usage and understand the capabilities of Fly's Redis implementation.

What You'll Learn

1

How to suspend a Fly application to save resources without losing configuration

2

How to resume a suspended Fly application and redeploy it with previous settings

3

When to use the restart command for applications on Fly

4

Why certain Redis commands are unsupported on Fly's Redis implementation

Key Questions Answered

How can I park my Fly application without destroying it?
You can use the fly suspend command to turn the number of instances down to zero, effectively stopping the application while keeping its configuration intact. This allows you to save resources without needing to destroy and redeploy the application.
What does the fly restart command do?
The fly restart command restarts each instance of your application in place without triggering a deployment. This is useful for resolving indeterminate states in your application without needing to redeploy.
What Redis commands are unsupported on Fly?
Fly's Redis implementation does not support Publish/Subscribe commands, Redis scripting commands, or Geo-based commands. This is part of a small set of unsupported commands primarily related to server or client management.
Can I set the minimum number of instances for an app to 0?
No, Fly applications will always have at least one instance running. To effectively stop an application, you must use the suspend command.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Utilize the fly suspend command to manage resource consumption effectively when your application is not in use.
This command allows you to pause your application without losing any configuration, making it a practical choice for developers who need to manage costs while maintaining their app's state.
2
Use the fly restart command to refresh your application instances if they become unresponsive.
This command can help clear out any temporary issues without the need for a full redeployment, saving time and reducing downtime.
3
Be aware of the limitations of Fly's Redis implementation to avoid unexpected errors.
Understanding which commands are unsupported can help you plan your application's architecture and avoid runtime issues related to unsupported features.

Common Pitfalls

1
Attempting to use unsupported Redis commands like Publish/Subscribe can lead to errors.
Developers should familiarize themselves with the limitations of Fly's Redis support to avoid these issues and ensure their applications function as expected.