Skip to content

v0.11.2

Compare
Choose a tag to compare
@chesedo chesedo released this 02 Mar 20:32
· 13 commits to b1c8aba3a5df53b13fd67eb837aad9a5731bbd9d since this release
262ef1a

shuttle: v0.11.2 update

We're excited to release shuttle v0.11.2! 🚀

Sleeping Idle Projects

Shuttle imposes no restrictions on how many projects a user can create. While we are in alpha this is a win-win, users creating many and varied projects is great for testing both our code and how we handle load. However, this has lead to a sizable amount of idle projects. To remedy this, we will start putting these idle projects to sleep, by default after 30 minutes of no activity.

By activity we mean both:

  • CPU load of the project over a 30 minute window. The load is increased when a project receives traffic (for example, traffic to an API endpoint for an axum server, or calling the commands of a discord bot in a discord server). An HTTP server (eg. axum or rocket), will need about 2 requests per minute over the idle-time period to be considered active, a discord bot will need about 6 calls per minute.
  • User interaction, for example running cargo shuttle status or any other CLI commands except for cargo shuttle project <cmd> commands.

If the project is sleeping, traffic to the project or user interaction will wake it, and in our tests this usually takes around one second. Important: if a discord bot is sleeping due to inactivity, calling the bot commands will not wake it, only developer interaction through the CLI will (but traffic will keep it from going to sleep). See the below instructions for how to increase the idle limit.

Since we don’t really want to restrict active users yet, this limit can be freely modified. You can change it by passing in a flag when creating a project: cargo shuttle project new --idle-minutes 40. If you pass in --idle-minutes 0 the idle timeout will be disabled and your project will never sleep. This is especially useful for discord bots, since they will not be awoken by traffic (people using the bot commands in a discord channel), only by developer interaction through the shuttle CLI.

Due to the nature of these changes, to be able to run cargo shuttle project new, you will need to update your cargo-shuttle CLI (so if you don’t need to run project new you don’t have to update now).

To upgrade your shuttle CLI, run: cargo install cargo-shuttle, or if you’re using cargo-binstall, cargo binstall cargo-shuttle.

If you’d like to upgrade your project container, run the rm and new project commands. This will not delete any databases, and you will keep your project name:

cargo shuttle project rm 
cargo shuttle project new

Finally, redeploy your shuttle service:

cargo shuttle deploy

Note: The versions of dependencies like shuttle-service, shuttle-secrets and the other resource libraries were not incremented for this release, they should stay at 0.11.0.

New Contributors

  • @jonaro00 made their first contribution to shuttle by doing some much needed housekeeping of our various markdown files and docs, as well as cleaning up some redundant dependencies in #666 , #664 and shuttle-hq/shuttle-docs#45

Commits for this release

Full Changelog: v0.11.1...v0.11.2