4 ms·
I'm not sure this is well-known enough yet - fly now supports scale-to-zero services using fly machines - https://fly.io/docs/machines/ https://fly.io/docs/mach
by biorach 4y ago
I'm not sure this is well-known enough yet - fly now supports scale-to-zero services using fly machines - https://fly.io/docs/machines/ https://fly.io/docs/machines/
- hamandcheese 4y agoDoes scale to zero work with ordinary fly apps yet?
- biorach 4y agoProbably. Depends. For a simple app should be straighforward. I set up a machine - a few weeks ago this involved a few direct api calls using curl - maybe `flyctl` can do it all now. Then I deployed on that machine a version of my app that gracefully shut down if no requests were received for 60s. Works great. Shuts down after a minute, boots back up in under a second when a request comes in. See the docs for details
- TheHappyOddish 4y agoI found the docs difficult and inconsistent when moving between flyctl and cURL when I tried playing with machines a few months ago. I daresay they'll be wonderful once the team get the machine stuff working under flyctl fully. Their generous free tier does make it easy to play and assess though.
- mrkurt 4y agoNo, ordinary Fly apps (what we call v1 apps) are managed by nomad. They don't scale to zero. You can create a machine based app and it'll scale to zero just fine, but you lose most of the magic of `fly deploy` right now.
- rendaw 4y agoI've been trying fly machines with terraform and running into one bug after another: https://github.com/fly-apps/terraform-provider-fly/issues/125 https://github.com/fly-apps/terraform-provider-fly/issues/12... https://github.com/fly-apps/terraform-provider-fly/issues/126 https://github.com/fly-apps/terraform-provider-fly/issues/12... https://github.com/fly-apps/terraform-provider-fly/issues/127 https://github.com/fly-apps/terraform-provider-fly/issues/12... I was really excited since fly seems dead simple, but I haven't gotten it running yet...
- mrkurt 4y agoThe Terraform provider was a one off project from the community. We haven't really focused on it in earnest yet, unfortunately. We ended up sponsoring it, but until we get Fly apps off Nomad I don't think we'll have the best terraform story.
- rendaw 4y agoAh, well that explains it I guess. Though, it's a "partner" provider and it's in your official github account, plus there's no notices saying it's not officially supported... it would probably help people if that were a bit clearer.
- tptacek 4y agoYep, this is a good note. Things got fuzzy, because we were so impressed by the person who took it upon themselves to randomly build a Terraform provider for us that we hired them.
- rendaw 4y agoSorry, not to use this as a support forum, but what exactly does it need? Just some provider-side bug fixes? Or are there Fly-side changes that need to be made before it will work? If it's something small I wouldn't mind poking at it.
- mrkurt 4y agoJust provider bug fixes / developments. The APIs it use are pretty stable. The particular errors in those issues look like either badly formed API calls, or something weird with auth. It also probably needs an update to use api.machines.dev. It is currently trying to connect over wireguard to hit our private API, because we didn't have a public API endpoint when it was built. This is probably brittle. :)
- rendaw 4y agoWhat's api.machines.dev? The documentation here says you need a VPN connection still https://fly.io/docs/machines/working-with-machines/ https://fly.io/docs/machines/working-with-machines/ Can I just sub `https://api.machines.dev https://api.machines.dev` in for the api hostname everywhere?