Jeykey

Jeykey

How to scale Elixir and how does it compare to something like Golang and Kubernetes?

I always hear people talking about how efficient and scalable Elixir and Phoenix are, but I cant find any real tutorials on how to do it? As far as I can tell I need all instances to be in one application in order for channels to work properly. How can I achieve something like this and how does it compare to using Golang and Kubernetes with stateless applications on Google Cloud?

Most Liked

Ninigi

Ninigi

The problem is, most people talk about scalability without ever hitting a limit.

Here is how I scale a single phoenix application:

  • get a 5 dollar droplet on digitalocean, run a postgresql server and my phoenix application on the same server - until I hit a limit, then I upgrade the droplet

here is how I scale a single ruby on rails application:

  • get a 5 dollar droplet on digitalocean, run a postgresql server and my rails application on the same server - until I hit a limit, then I upgrade the droplet

her is how I scale golang application:

you catch the drift?

Elixir theoretically has amazing tools for an application running on multiple different physical machines - but I highly doubt whatever 99% of us here are doing calls for that.

Phoenix is a great framework to work in, Elixir is great to work in, Ecto is a lot more enjoyable to me than many other database - packages (or whatever you call ecto), Live View is the coolest thing I have worked with in years.
Even if someone told me that Phoenix and Elixir do not scale, I wouldn’t care.

12
Post #2
sb8244

sb8244

Author of Real-Time Phoenix

I’m using elixir running on k8s for rest-based microservices and real-time WebSocket based services.

It works great. I run each app on multiple pods and even in multiple k8s clusters (clusters aren’t networked directly).

Regarding go: that discussion has played out a lot here. Search should give lots of results.

dimitarvp

dimitarvp

By “scaling well” people might mean different things but to me it means that a very cheap server can do a lot before needing an upgrade. Trying with Rails and Phoenix and the difference was a night and day. The Rails mini server needed upgrade almost immediately while Phoenix hummed along all the way to 500 - 1000 requests/sec before I started feeling it lag (and it wasn’t by much).

As for stateless, Elixir is not your tech there. The startup times aren’t favourable for it. Stuff like Go and Rust are much better.

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43757 214
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

We're in Beta

About us Mission Statement