If I wrote my web app in Elixir, would I be able to get rid of Nginx and just use some Elixir framework to do SSH termination, load balancing, and hot code reloading whenever I needed to change up the routes? Can this be done across numerous compute nodes fairly easily?
Follow-up question: how difficult is it to do a database migration for an Elixir application with hot code reloading?
The reason I ask is because is because I (probably unwisely) asked an LLM chatbot (Gemini) this question and it said typically people put their Elixir programs behind an Nginx load balancer so you can reboot the Elixir application if necessary. I asked it why anyone would do this since the main benefit of using the BEAM VM and Erlang/Elixir it is to have hot code reloading and no downtime. The chatbot started spouting off very confused and self-contradictory answers, so I am pretty sure it was just lying.
But I am no expert on Elixir, so now I want to ask a human who knows better than me, the way we all used to do before LLMs were invented.
#Tech #Software #ElixerLang #ErlangOTP #FullStack #WebDevelopment #AskFedi
@ramin_hal9001
In my experience, distributed Elixir apps are still containerized leveraging kubernetes, and we don't rely too much on hot code reloading.
I think that if we take worst-case scenario for a problematic deployment, this approach is safer.
For the DB migration with hot-code reloading, it's okay as long as you plan your migrations to never break the app. Migrations adding the fields, then another deploy for the code, and another deploy to remove deprecated fields.
@ramin_hal9001 I recall reading that people choose external methods instead of hot code reloads (which probably suits a soft real-time system more).
@bokay