Hello, I followed this docs
Everything is working fine, but with this workflow the app is deployed using two machines in fly.io by default.
How can I change it to deploy with only one machine when I want to?
Thanks
Hello, I followed this docs
Everything is working fine, but with this workflow the app is deployed using two machines in fly.io by default.
How can I change it to deploy with only one machine when I want to?
Thanks
hi @hye
We recommend at least 2 Machines per app for redundancy. But if you only need one Machine, then you can modify the step that runs fly deploy
in the action’s yaml file with the option --ha=false
.
- run: flyctl deploy --remote-only --ha=false
Thanks a lot.
I’m using fly.io to host a small discord bot for personal use.
Does fly handles automatically 2 machines at the same time? When one is unstable or offline the other assumes the following requests? Does it have some kind of load balancer?
Or do I need to set up something?
I’m a beginner using fly.io (and deploying apps by myself in general)
For a personal discord bot, you can definitely run just one Machine, as long as you know there’s a risk of downtime if there are any host issues.
There’s some brief discussion about how to handle 2 Machines for this type of app in this thread:
By default, apps have auto start and stop enabled, with minimum machines running set to 0. This means that when your app has no traffic, the Machines will be stopped. This can be a good way to run 2 Machines without incurring the costs of keeping them running all the time, but it could be overkill for your needs getting started.
Here’s all the details about how auto start and stop work, which should answer most of your questions:
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.