tadasajon

tadasajon

The consensus in the elixir community seems to be that Fly.io is the way to deploy Phoenix apps, and I have successfully done this myself, but I don’t understand how it works.

The docs state:

We want you to run your full stack close to users, whether it’s a simple web service or your database-backed opus with multiple supporting services.

But what if I have users all over the world? Does Fly.io constantly move my app around to be close to different users? What about the database – certainly it should be the single source of truth, so I don’t see how it can be moved easily.

What does Fly.io offer that is different from just picking a datacenter in some location that you think will be close to the majority of your users and just deploying your app there?

Showing Posts 1 to 5

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

I think Fly is doing great stuff, and I think they’re a great default for deployment. That said, I think there’s still a LOT of us deploying Phoenix in more traditional cloud environments, or in even more traditional servers. Fly is definitely not the majority of deployments, and I would be surprised if they were a plurality.

I am not a Fly expert, but my sense is that they help in two ways:

  1. LiveView in particular adds client → server round trips for rendering that often do not hit the database. These are helped by having the app closer to the client.
  2. Fly has global replicas for postgres, which basically let you have read replicas colocated near your apps near your users at the edge. This doesn’t help writes, but it definitely cuts down on latencies for reads.
LostKobrakai

LostKobrakai

Do add to that: Fly enables you to be closer to your users, but it doesn’t come for free, but as options you need to use.

  1. The first option is scaling your app server across multiple regions. That can be done on other hosts as well and while it is simple on fly I wouldn’t call that something you won’t or can’t see elsewhere.
  2. The second option is scaling your db across regions as read replicas, where you’d still stick to a single writeable instance. Fly uses the first point as the underlying infrastructure for their managed databases. On top there are a few well thought out conventions to let their hosted db setup be rather hands off for the db scaling side and also provide some comparatively simple means of making your app ready for such a setup as well. This again can probably be done elsewhere as well, though I haven’t seen all of those points be combined that well.
tadasajon

tadasajon OP

Fly is definitely not the majority of deployments, and I would be surprised if they were a plurality.

What deployment solution would you guess accounts for the plurality of deployments?

gregvaughn

gregvaughn

Look up Mark Ericksen’s talk at last year’s ElixirConf for more details. It’s some clever stuff.

sorentwo

sorentwo

Oban Core Team

From polls, conversations, and a lot of support I can confidently say elixir apps are deployed all over the place: GCP, AWS, Heroku, Render, Gigalixir, Hetzner, and Fly come up regularly (though Gifalixir and Heroku are declining).

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews