Skip to content
0:00 / 0:00

#elixir#fly.io#distributedelixir

ElixirConf 2021 - Mark Ericksen - Globally Distributed Elixir Apps on Fly.io

ElixirConf

13K subscribers • 28 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Mark Ericksen

Intermediate. Assumes working knowledge.

7.9K views5 years ago2 recommendations

Distributed systemsCloud and DevOpsElixir and ErlangScaling and large-scale architectureNetworking and protocols

Mark Ericksen explains how to run and scale globally distributed Elixir and Phoenix LiveView applications across multiple geographical regions.

Why globally distribute your app? It’s a better experience for your users. LiveView rocks, even more, when it’s close! Elixir nodes can be clustered together. The ElixirLang Getting Started Guide walks you through doing that. What isn’t obvious is how to distribute the nodes in multiple geographical regions. It isn’t because it’s hard for Elixir, it’s because it’s a hard networking and operations problem.

Why it's here

2 people recommend this

What people say. Engineers recommend this talk for understanding how to geodistribute Elixir nodes and scale databases globally with low latency.

Moments people linked to

u/tronathanin r/elixir • Recommends

On “Fly.io Alternatives // What's your deployment setup?”

…into simplifying distributed postgres, and part of the reason for that is LiveView - to have a snappy LiveView app that will run and scale globally, you need app nodes distributed around the world and simple/reliable postgres scaling. This is a bit long, but worth the watch if you're interested in using Elixir/Phoenix/Liveview/Postgres globally: [video Didn't mean to come off like a Fly fanboy here; I'd love to find something even better than fly for elixir deployment.…

u/flummox1234in r/elixir • Recommends

On “If you were in charge of a startup tech stack, how would you use elixir to actually scale and make every work seamlessly?”

nope not a dumb question. With erlang distributed nodes (elixir compiles to erlang and runs on the BEAM) you can run the code on specific nodes. So say if you want to run code on a node geolocated in say Australia because it's closer to your database and return the results. This video shows it better link to this video

u/flummox1234in r/elixir • Recommends

On “Running a Phoenix App locally the could at the same time”

You'll have to put your db in the cloud but something like this setup would do what you want. You would leverage the distributed ability of elixir. link to this video That said writing the elixir app to your specific needs and deploying it will be a bit more complicated. Elixir releases and docker will be your friends in this endeavor.

u/flummox1234in r/elixir • Recommends

On “What's special about Erlang and Elixir?”

distributed - you can connect two nodes and load and run code on another node from the first node and leverage the results on the first node, e.g. geographically dispersed nodes running code on a remote master and responding in low latency. Fly.io did a talk on this one. IME there aren't many languages that do this without significant setup or abstraction or additional libraries. Comparing something that is built into a language and is easy to use to kubernetes is laughable. Kubernetes takes a team of people to setup and maintain properly and is a considerable amount of abstractions itself. Erlang's version is just built in for free and ready for you to use. A better comparison might be so…
1View on Reddit

u/flummox1234in r/elixir • Recommends

On “What are thoughts about this article from the Elixir community?”

also because erlang is distributed, you can geodistrubute Elixir if latency is an issue. There was a really good fly.io demo about it link to this video

u/flummox1234in r/elixir • Mentions

On “what is the common usage of elixir”

Erlang was used by Sony Erickson for their phone switches. The creators of Erlang thankfully convinced Erickson to release it as open source so we could all benefit. Elixir runs on the erlang VM so you have both erlang and Elixir at your disposal. IME the best use case for Elixir is Supervised Parallelism, i.e. when you need crash resistance with high concurrency. For me particularly I like it for things like APIs, Web Platforms (lower resource usage than other languages), and embedded devices via Nerves. However I've also used it on my endpoints to monitor them via Erlang's built in os_mon. Another usage is the distributed nature of erlang can allow you to do things like connect two n…
10View on Reddit