Hi Nejis, I completely move and re-build the website everything from scratch, at the first launch i use Flask tech stack and now it's using Elixir and Erlang VM!!
is that good? YES to be sure (even tho it's new program languange (2012))
>first i will show you 100s videos from Fireship about elixir
https://www.youtube.com/watch?v=Z_FHEFao-r8
"The Secret Language Scaling WhatsApp and Discord"
>Then this article :
https://favtutor.com/articles/whatsapp-discord-and-the-secret-to-handling-millions-of-concurrent-users/
The historical context of Erlang, its concurrency model, fault tolerance, and distribution capabilities. WhatsApp effectively scaled to over a billion daily active users with a minimal engineering team using Erlang, because it provides high scalability with a tiny footprint and supports hot-loading. Similarly, Discord leveraged Elixir for its chat infrastructure, allowing for efficient real-time communication.
So what's the good thing using Elixir and Erlang VM for this website?
Performance Benefits:
1.
Lightning-Fast Response Times : The website now leverages the BEAM (Erlang Virtual Machine), known for its exceptional concurrency handling. Each user connection is managed by a lightweight process (not OS process), allowing thousands of simultaneous connections with minimal resource usage.
2.
Fault Tolerance : The Erlang VM's supervisor system ensures that if any part of the application crashes, it's automatically restarted without affecting other parts. This means more uptime and reliability for users.
3.
Hot Code Swapping: One of the most powerful features - I can deploy updates without stopping the server. This means zero-downtime deployments!
Practical Impact:
- Page load times reduced by
~40%
- Elixir/Erlang VM is approximately
30% more memory-efficient (flask running on 400 MB (idle state) while Elixir consume about 280 in the same condition)
- Ability to handle 6x (or) more concurrent users
- Improved reliability with
99.99% uptime
Future Benefits:
- Easy scaling for future growth
- Built-in support for distributed systems
- Robust foundation for adding real-time featurΓ₯es
- Lower hosting costs due to efficient resource usage
This migration from Flask to Elixir/Phoenix represents a fundamental improvement for better performance, reliability!
.
/ V\
/ ` /
<< |
/ |
/ |
/ |
/ \ \ /
( ) | |
________| _/_ | |
<__________\______)\__)