### Question for #Erlang , #Elixir , #BEAMVM people:
-
Question for #Erlang , #Elixir , #BEAMVM people:
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 process. 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
-
R relay@relay.mycrowd.ca shared this topic
-
Question for #Erlang , #Elixir , #BEAMVM people:
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 process. 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 Hot code reloading is not the main benefit of BEAM at least for me, not even close. Generally I find that people don't bother with it because it requires a great deal of care with handling the state of long-living processes and usually a couple of seconds of downtime is not an issue (or you use blue-green).
I use Caddy as a reverse proxy because it has builtin certificate renewal without having to maintain my own solution in Elixir. And it has HTTP/3.
-
@ramin_hal9001 Hot code reloading is not the main benefit of BEAM at least for me, not even close. Generally I find that people don't bother with it because it requires a great deal of care with handling the state of long-living processes and usually a couple of seconds of downtime is not an issue (or you use blue-green).
I use Caddy as a reverse proxy because it has builtin certificate renewal without having to maintain my own solution in Elixir. And it has HTTP/3.
@nicd@masto.ahlcode.fi thanks for your answer!
I guess I was picturing Erlang/Elixir web servers as being stateless, in that they would do all persistence with the relational database, at least for the lightweight processes that handle routing and HTTP request/response. What sort of processes would be alive for a long time for which would contain state that could make hot code reloading difficult?