re: From Rails to Elixir: Know Your App VIEW POST

re: Hi João, really nice post. Regarding performance improvements, we are on the process of migrating our Rails monolith to Elixir and Phoenix. It's q...

Hi Elvio, thank you!

That's great, I'd love to hear from someone who is doing this in the real world.

There are some articles out there from people who have done similar migrations but they focus primarily on the outcome (like "we had X servers and were able to reduce to Y"). I haven't come across a nice detailed article focusing on the actual pains and gotchas. That would be very welcome.

faster response times and using half of the resources (AWS instances, RDS db, etc)

Interesting. I wouldn't expect databases (RDS in your case) to benefit too, in fact I would expect extra load on data repositories due to Phoenix increasing concurrent accesses. I mean, since you are now capable of handling more requests in the web server layer, shouldn't RDS be receiving an increase in traffic as well?

There might be an hidden factor in there that I'm not considering. I've come across very surprising outcomes in the past that I wasn't expecting at all.


Yes, I think there are many things I could write about "pains and gotchas" :)

Regarding RDS, is an interesting thing. We are migrating from a Rails app where all the servers were connecting to the same database, as also multiple Sidekiq workers. It required a lot of open connections to handle that.

We now have a quite simple setup where a small pool of connections can easily handle that, even with traffic always hitting the database :)

Yeah I guess that's a nice side effect, with Elixir you might get more control over your whole system (including "external" resources like databases) because it's so easy to reason about what is running concurrently.

Pretty cool!

code of conduct - report abuse