🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com) 🍿 Benchmarks: ua-cam.com/play/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn.html&si=p-UOaVM_6_SFx52H 👋 AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra
Elixir/Erlang's core strength lies in built-in distributed computing, with OTP offering robust primitives for fault-tolerance, node synchronization, and process communication out-of-the-box. While Go excels at concurrency and can achieve similar distributed capabilities but often can be complex
Erlang/Elixir webserver library called cowboy should be tuned up (unfortunately or luckily). With basic settings it's like postgres with settings out of box. Also BEAM also should be tunned up. With tuning we've got not so big gap between this technologies in our tests (1-5% in peak). I'm not expert in Elixir but if you will compare Erlang, i can help with tuning/tests.
I agree this test is comparing apples to oranges and I say Elixir shines for the web and the BEAM is very much alone as a VM with their concept of processes. For the same amount of request a very fast web sevrer is less costly but Elixir will save you cost by other means such as having no need for external services for pubsub, caching, background task and to not have to write an API layer for Node to Node communication. On a side note, to solve some of the Elixir slowness it's easy to use Rust through Rustler. Scaling is still the hardest part of a system and Elixir makes it easier to have to rely less on the costly cloud.
First - I like the video, it was really interesting! 😊 For people who know nothing about Elixir: Elixir's strength lies elsewhere. Everybody knows that on a single PC, Elixir probably loses to Go in terms of raw computing power. However, the BEAM/Erlang platform is designed for massive, distributed systems that do not fail. Go is just a language-fast on one machine-but good luck implementing the features that Elixir already has baked into its platform. It's kind of an apples-to-oranges benchmark, but it's still interesting to see exact numbers on one machine. I understand that many people have no clue what Elixir/Erlang/BEAM VM is and think it's just another language-I was one of them not so long ago. Let’s just say that comparing the speed of Go and Elixir is like comparing whether an athlete can do more backflips than Gandalf. Sure, he probably can, but Gandalf has way more tricks up his sleeves-tricks no athlete can match.
That said, if you need raw performance to save server costs, or you're sure a single server is all you'll ever need, Go is an excellent choice. But if you're building distributed systems or unsure about future scaling needs, Elixir and the BEAM platform are hard to beat. It's all about using the right tool for the job! 😊
I am quite interested in Elixir, and also I saw one of Sasha Juric's talks once and I loved what I saw from BEAM/Erlang. But I wonder... the problems that BEAM and Erlang solve aren't really that common, are they? And it seems that if a company would have those problems, then it means that they probably have the means to pay for top-class software engineers that could solve those problems using languages like Go, correct? Or am I missing something? Granted that Erlang/Elixir would probably be easier (and that could mean it would be cheaper as well), but sometimes language adoption is important, and Go > Elixir in terms of adoption.
a stup!d reasoning for fanboys when their favorite language got murdered by other language in performance. do you even understand the point of this benchmark? both are being use as goddamn webserver for handling HTTP request to determine their performance, nothing else. these are for those who want to consider efficient with minimal "resource usage" for building a web app and how a typical webapp will be deployed/setup. but your reasoning is not even related on the point tested here.
@gabrielg9592 Well, I’d actually say those problems are extremely common-and they’re often solved poorly. Companies tend to reinvent the wheel over and over, resulting in buggy software that takes years to develop properly. The BEAM platform provides a robust foundation to avoid many of these pitfalls right out of the box. That said, the one big challenge with Elixir/Erlang is its niche status. There aren’t many developers familiar with it, so it feels risky for companies to adopt it. The concern isn’t just about the lack of developers-it’s also about committing to a large, critical codebase in a language that few people know well. That can make companies hesitate, even if the technology itself is a great fit.
@@jsonkodyYes i agree. Erlang and BEAM have a lot of mechanisms in place for things like clustering and fault tolerance. But let's face it, in it cloud era, most people don't have these concerns as they are happy to ship that problem away to their infrastructure using their most powerful magic spell, "kubernetes". Distributed system choices are not really a headache on the language level but now become a whole host of tools and tricks.
Anton, hint: when tools that you're comparing have too big difference in the name length there's no point to blur them during the introduction, i can still read the names 😁
I like the memory usage as a Mib and not %. It shows how the API interacts with a machine, and not how the API interacts with the specifc AWS instance.
Hey, awesome video, as always. May I recommend raising your voice or increasing the microphone gain a little bit more? The videos are a little quiet, and sometimes, it's hard to hear what you are saying. Thanks!
9:00 is this always true, that creating a new connection for a request is expensive? I have a production EC2 instance in the same region as an RDS instance, connecting through a private VPS. When I measured the time to initialize a new MySQL conn in PHP, I was observing it being in the microseconds. Idon't remember the exact number, but this doesn't feel like an expensive operation, when we consider actually querying data
The problem with connections in Postgres is that they are a forked process with its own memory for tasks. So if you quickly create and destroy connections, you create a lot of churn due to short-lived forking and allocations. i don't know about MySQL.
i've been using go pro for a year and elixir on my free time since a month and elixir dx is so good in comparaison golang is really an unpleasant prog lang to work with but it pay the bills
For me it's vise-versa. I've been using go for years, both professionally and for personal projects, but I have to pick up Elixir recently and I find it very frustrating (mostly due to dynamic typing). I'll better use Scala + Pekko for easy clusterization than Elixir.
The main reason Big tech companies (chat and payment gateway) are moving to elixir from go is concurrent process. And I missed this aspect in the test scenario.
Hi, thanks for the nice video! I also would ask - in 7:30 you said, that `CPU throttling will occur if a container tries to use more CPU than it's limit` - how and do even can this appear, if CPU limits are just natural numbers? The application 'sees' more cores, than it should, or what?
@@AntonPutra but it is true Ruby was adpted with the same mean. And its failed. When people realized that it is.. In many cases you are not required use fancy concurrency...especially in web, better avoid.
Yeah, you used M instances. They have more memory but a different chipset. I don’t know if they are better than C, but since the memory barely go near 1GB, C instances could be cheaper
I'm a little confused when you test the RPS metric. If you are reaching the computing limits and the RPS is started to cap out, what's happening on the client side? Is the request timing out, therefore concluding the server can't handle it? Do you instill rules on how long until a timeout?
I think I understnad the correlation between availability and RPS. But why do we see such a huge drop in RPS in Golang, as soon as availability caps at 90%? Shouldn't we see the the RPS reach a constant line once Go's hit its limit, and see the availbility slowly go down from 100%, since your still increasing requests per second?
i frequently set a timeout for 100ms, you can see it from the config. when the client times out, it gets a 408 status code, which decreases availability. availability = (successful req / total) * 100 config - github.com/antonputra/tutorials/blob/main/lessons/230/tests/1-test/0-config.yaml#L16
I’ve written lots of both. Go is stupid fast, but Elixir is better in pretty much every other dimension for web systems (distribution, composability, debugging, developer experience, frontend, FFI, architecture, fault tolerance, etc)
So you compared two compiled languages (one is compiled to BEAM) and ran it on K8S, while Elixir shouldn't be ran that way? Makes sense.................. :D
well, the creator of Elixir said it's fine to run it on k8s and made some improvements in this pr. i'll refresh this test soon. PR - github.com/antonputra/tutorials/pull/370
I think considering the concurrency model of each, that makes some sense. When you do anything, especially, IO, in elixir, each request does not process it asynchronously to other processes. A bunch of stuff may have a single GenServer that processes its inbox synchronously. So if your server does one thing, a lot, and repeatedly, you get a result like this. In cases when the job of a server is more versatile, the concurrency model does a lot more for you and adds a lot of reliability with it. I have not tested this idea though. I'm just speculating.
@AntonPutra no problem. I have done some tests right now myself. And I have observed the same exact drop because of the process number limit in Erlang. I have never increased it myself, but I bet increasing the maximum number of processes would have a huge effect on that sudden drop.
@@LtdJorge well. I'm not sure why the limit on the processes is there as well. But to have one node responding to for example 20000 simultaneous users is also kind of weird when you can so easily distribute the workload with BEAM.
This test doesn't show the strengths of Elixir. In terms of raw performance, Go is much better than Elixir. Although I do agree with you that these results are disappointing since it even loses out to nodejs. But Elixir shines in other areas such as making certain very hard problems trivial to solve (concurrency, distribution, fault tolerance, and self-healing). A better benchmark is Theo's video where he built the same app using 5 different frameworks (Go and Elixir Phoenix included) and Phoenix was the best out of all of them.
No reason for C and Rust to be tested. Everybody knows that these are the fastest options. However, people need to know how to get the most performance with minimum efforts. That's why other languages exist.
1 In the beginning was the Word, and the Word was with God, and the Word was God. 2 The same was in the beginning with God. 3 All things were made by him; and without him was not any thing made that was made. 4 In him was life; and the life was the light of men. 5 And the light shineth in darkness; and the darkness comprehended it not. 6 There was a man sent from God, whose name was John. 7 The same came for a witness, to bear witness of the Light, that all men through him might believe. 8 He was not that Light, but was sent to bear witness of that Light. 9 That was the true Light, which lighteth every man that cometh into the world. 10 He was in the world, and the world was made by him, and the world knew him not. 11 He came unto his own, and his own received him not. 12 But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name: 13 Which were born, not of blood, nor of the will of the flesh, nor of the will of man, but of God. 14 And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth. (Jn.1:1-14)
@@jm-alan надеюсь, вы лучше пишете код, чем мыслите о вечности. Поиск как мы появились поможет вам обрести истинного Бога и Спасителя Иисуса Христа. :)
🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com)
🍿 Benchmarks: ua-cam.com/play/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn.html&si=p-UOaVM_6_SFx52H
👋 AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra
1) посмотрите тесты на techempower , чтобы не быть ангажированным в тестах Zig vs Rust. :)
2) зайдите на selectel - может, там цены ниже :)
Посмотрите тесты на techempower , чтобы не быть ангажированным в тестах Zig vs Rust. :)
Elixir/Erlang's core strength lies in built-in distributed computing, with OTP offering robust primitives for fault-tolerance, node synchronization, and process communication out-of-the-box. While Go excels at concurrency and can achieve similar distributed capabilities but often can be complex
ok, i'll try to add more use cases in the future
Erlang/Elixir webserver library called cowboy should be tuned up (unfortunately or luckily). With basic settings it's like postgres with settings out of box. Also BEAM also should be tunned up. With tuning we've got not so big gap between this technologies in our tests (1-5% in peak). I'm not expert in Elixir but if you will compare Erlang, i can help with tuning/tests.
Most people arent trying to recreate the telephone network...
@@wolfeygamedev1688no, but they are trying to achieve high throughput in increasingly distributed architectures.
@@AndreiBurchackBandit is now the default and is faster than Cowboy
My yt recommendations: video created 9 sec ago
😇
I agree this test is comparing apples to oranges and I say Elixir shines for the web and the BEAM is very much alone as a VM with their concept of processes.
For the same amount of request a very fast web sevrer is less costly but Elixir will save you cost by other means such as having no need for external services for pubsub, caching, background task and to not have to write an API layer for Node to Node communication.
On a side note, to solve some of the Elixir slowness it's easy to use Rust through Rustler.
Scaling is still the hardest part of a system and Elixir makes it easier to have to rely less on the costly cloud.
ok thanks for the feedback
Thanks!
thank you for support!
First - I like the video, it was really interesting! 😊
For people who know nothing about Elixir:
Elixir's strength lies elsewhere. Everybody knows that on a single PC, Elixir probably loses to Go in terms of raw computing power. However, the BEAM/Erlang platform is designed for massive, distributed systems that do not fail. Go is just a language-fast on one machine-but good luck implementing the features that Elixir already has baked into its platform.
It's kind of an apples-to-oranges benchmark, but it's still interesting to see exact numbers on one machine.
I understand that many people have no clue what Elixir/Erlang/BEAM VM is and think it's just another language-I was one of them not so long ago. Let’s just say that comparing the speed of Go and Elixir is like comparing whether an athlete can do more backflips than Gandalf. Sure, he probably can, but Gandalf has way more tricks up his sleeves-tricks no athlete can match.
That said, if you need raw performance to save server costs, or you're sure a single server is all you'll ever need, Go is an excellent choice. But if you're building distributed systems or unsure about future scaling needs, Elixir and the BEAM platform are hard to beat. It's all about using the right tool for the job! 😊
I am quite interested in Elixir, and also I saw one of Sasha Juric's talks once and I loved what I saw from BEAM/Erlang. But I wonder... the problems that BEAM and Erlang solve aren't really that common, are they? And it seems that if a company would have those problems, then it means that they probably have the means to pay for top-class software engineers that could solve those problems using languages like Go, correct? Or am I missing something? Granted that Erlang/Elixir would probably be easier (and that could mean it would be cheaper as well), but sometimes language adoption is important, and Go > Elixir in terms of adoption.
a stup!d reasoning for fanboys when their favorite language got murdered by other language in performance.
do you even understand the point of this benchmark?
both are being use as goddamn webserver for handling HTTP request to determine their performance, nothing else.
these are for those who want to consider efficient with minimal "resource usage" for building a web app and how a typical webapp will be deployed/setup.
but your reasoning is not even related on the point tested here.
@gabrielg9592 Well, I’d actually say those problems are extremely common-and they’re often solved poorly. Companies tend to reinvent the wheel over and over, resulting in buggy software that takes years to develop properly. The BEAM platform provides a robust foundation to avoid many of these pitfalls right out of the box.
That said, the one big challenge with Elixir/Erlang is its niche status. There aren’t many developers familiar with it, so it feels risky for companies to adopt it. The concern isn’t just about the lack of developers-it’s also about committing to a large, critical codebase in a language that few people know well. That can make companies hesitate, even if the technology itself is a great fit.
@@jsonkodyYes i agree. Erlang and BEAM have a lot of mechanisms in place for things like clustering and fault tolerance. But let's face it, in it cloud era, most people don't have these concerns as they are happy to ship that problem away to their infrastructure using their most powerful magic spell, "kubernetes". Distributed system choices are not really a headache on the language level but now become a whole host of tools and tricks.
Anton, hint: when tools that you're comparing have too big difference in the name length there's no point to blur them during the introduction, i can still read the names 😁
haha
Also the colors gave it away ;)
i was going to comment on this and said to myself no one really cares, if you click this video you're probably here to watch it till the end
C'mon you can understand the result from preview screen 😂
yep, exactly my thoughts xD
The GOat does it again!! 😎
😂
dotnet 9 vs go next, revisit the last benchmark :D
yes i'm planning to update that one
how much do these benchmarks typically cost?
$10-30
Can you please do comparison between C++ and Rust 🙏🏻🙏🏻🙏🏻🙏🏻
yes, it has high priority on my list 😊
I love go and the fact that I chose it as my favorite
i love it too
I like the memory usage as a Mib and not %. It shows how the API interacts with a machine, and not how the API interacts with the specifc AWS instance.
Bro shut up
thanks! i'll keep it then
If only I was smart enough to make good PRs :(
give it a try
Hey, awesome video, as always. May I recommend raising your voice or increasing the microphone gain a little bit more? The videos are a little quiet, and sometimes, it's hard to hear what you are saying. Thanks!
thanks, i'll add some more volume
5:50 which third party JSON library did you use? :)
this one "github.com/json-iterator/go"
github.com/antonputra/tutorials/blob/main/lessons/230/go-app/server.go#L9C12-L9C39
9:00 is this always true, that creating a new connection for a request is expensive? I have a production EC2 instance in the same region as an RDS instance, connecting through a private VPS. When I measured the time to initialize a new MySQL conn in PHP, I was observing it being in the microseconds. Idon't remember the exact number, but this doesn't feel like an expensive operation, when we consider actually querying data
true, real-world queries with joins can be very slow compared to creating a new connection
The problem with connections in Postgres is that they are a forked process with its own memory for tasks. So if you quickly create and destroy connections, you create a lot of churn due to short-lived forking and allocations. i don't know about MySQL.
finally, thank you!
my pleasure!
i've been using go pro for a year and elixir on my free time since a month and elixir dx is so good in comparaison golang is really an unpleasant prog lang to work with but it pay the bills
interesting
For me it's vise-versa. I've been using go for years, both professionally and for personal projects, but I have to pick up Elixir recently and I find it very frustrating (mostly due to dynamic typing). I'll better use Scala + Pekko for easy clusterization than Elixir.
The main reason Big tech companies (chat and payment gateway) are moving to elixir from go is concurrent process. And I missed this aspect in the test scenario.
And also Elixir is simpler than Erlang
ok, i'll add more use cases
Hi, thanks for the nice video! I also would ask - in 7:30 you said, that `CPU throttling will occur if a container tries to use more CPU than it's limit` - how and do even can this appear, if CPU limits are just natural numbers? The application 'sees' more cores, than it should, or what?
What about Go vs .Net server batle
Or even better - go/net/java together.
soon, i'll refresh it with .net 9 and add memcache
Thanks
thank you for support!!
It seems to me that developers are more captivated by Elixir's language design than by its practical effectiveness. (I was once one of those).
interesting
@@AntonPutra but it is true Ruby was adpted with the same mean. And its failed. When people realized that it is.. In many cases you are not required use fancy concurrency...especially in web, better avoid.
Hey Anton, please test with C instances as well. Thanks!
C instances?
Yeah, you used M instances. They have more memory but a different chipset. I don’t know if they are better than C, but since the memory barely go near 1GB, C instances could be cheaper
Compare FastAPI with something interesting
coming next in a few days
Long awaited
yeah finally 😊
Anton, if possible, please compare Kafka and NATS JetStream!
yes in't on my list!
Hi, new here It would be nice if you could also offer tutorials in kubernetes. Excellent video by the way.
thank you! i have some on my channel and i'll make more after the new year
I'm a little confused when you test the RPS metric. If you are reaching the computing limits and the RPS is started to cap out, what's happening on the client side? Is the request timing out, therefore concluding the server can't handle it? Do you instill rules on how long until a timeout?
I think I understnad the correlation between availability and RPS. But why do we see such a huge drop in RPS in Golang, as soon as availability caps at 90%? Shouldn't we see the the RPS reach a constant line once Go's hit its limit, and see the availbility slowly go down from 100%, since your still increasing requests per second?
Bro is cooked
i frequently set a timeout for 100ms, you can see it from the config. when the client times out, it gets a 408 status code, which decreases availability. availability = (successful req / total) * 100
config - github.com/antonputra/tutorials/blob/main/lessons/230/tests/1-test/0-config.yaml#L16
Can you pls redo the C# vs golang test with firecracker-microvm! Thank you for your amazing content!
sure added
silencio ya empezo mi novela
sorry didn't get it
@@AntonPutra is a latinoamerican joke in S
spanish, nothing offensive
@@AntonPutrais a latinoamerican joke in spanish, nothing offensive
@@AntonPutra that is, silence, my favorite show has just started.
Isn’t erlang good for web sockets ?
idk but will find out 😊
Golang is very good at websockets too. I remember golang demo showcased 1 million sockets connection on a server
I would love to see Dragonfly vs. Skytable.
noted
Wonder if Cowboy would have fared better instead of Bandit for Elixir
Very helpful video. Why is your name like an Indonesian?
thanks lol
What about fastapi i heard it is as fast as go
coming next in a few days
impossible. Golang is compiled while python no.
I’ve written lots of both. Go is stupid fast, but Elixir is better in pretty much every other dimension for web systems (distribution, composability, debugging, developer experience, frontend, FFI, architecture, fault tolerance, etc)
thanks for the feedback, i'll try to add more use cases in the future
Nonsense.
Do spring Vs quarkus
it's on my list
Fastest test ever. 18k - > down
😊
So you compared two compiled languages (one is compiled to BEAM) and ran it on K8S, while Elixir shouldn't be ran that way? Makes sense.................. :D
well, the creator of Elixir said it's fine to run it on k8s and made some improvements in this pr. i'll refresh this test soon. PR - github.com/antonputra/tutorials/pull/370
I really someone will do a Clojure / Swift vs Go / Elixir
Go have had unfair advantage! Houses and k8s help!
maybe, i'll do some vm testing as well in the future
I'm never touching elixir 😂
haha
YARP vs nginx pls
ok noted
when swoole vs go?
omg i forgot about swoole, will do!
@ thank you so much!
Missing: database settings, connection pool information, query complexity, data size, number of connections.
missing?
database config - github.com/antonputra/tutorials/blob/main/lessons/230/postgresql.conf
pool size - github.com/antonputra/tutorials/blob/main/lessons/230/deploy/elixir-app/0-deployment.yaml#L29
query - github.com/antonputra/tutorials/blob/main/lessons/230/go-app/device.go#L31
number of connections - github.com/antonputra/tutorials/blob/main/lessons/230/deploy/go-app/0-config.yaml#L18
I think considering the concurrency model of each, that makes some sense. When you do anything, especially, IO, in elixir, each request does not process it asynchronously to other processes. A bunch of stuff may have a single GenServer that processes its inbox synchronously. So if your server does one thing, a lot, and repeatedly, you get a result like this. In cases when the job of a server is more versatile, the concurrency model does a lot more for you and adds a lot of reliability with it.
I have not tested this idea though. I'm just speculating.
ok thanks for the feedback, i may include more test cases in the future
@AntonPutra no problem. I have done some tests right now myself. And I have observed the same exact drop because of the process number limit in Erlang. I have never increased it myself, but I bet increasing the maximum number of processes would have a huge effect on that sudden drop.
@@AmirHosseinHonardustyes, BEAM should be tuned for the machine, but that is not as simple as getting an Elixir app running 😅
@@LtdJorge well. I'm not sure why the limit on the processes is there as well. But to have one node responding to for example 20000 simultaneous users is also kind of weird when you can so easily distribute the workload with BEAM.
Perfect
thanks!
Thanks ;)
😊
This is not even a fair fight. lol.
i was shocked as well
erlang next
pr pls
This is disappointing for Elixir.
well, if you can improve it, be my guest
@AntonPutra Nah I can't, am just saying for elixir and things I have heard, this is quite disappointing.
This test doesn't show the strengths of Elixir. In terms of raw performance, Go is much better than Elixir. Although I do agree with you that these results are disappointing since it even loses out to nodejs. But Elixir shines in other areas such as making certain very hard problems trivial to solve (concurrency, distribution, fault tolerance, and self-healing). A better benchmark is Theo's video where he built the same app using 5 different frameworks (Go and Elixir Phoenix included) and Phoenix was the best out of all of them.
Why always Go ? We need more Rust.
because go is the GOat
i'll do rust in a few videos
No reason for C and Rust to be tested. Everybody knows that these are the fastest options. However, people need to know how to get the most performance with minimum efforts. That's why other languages exist.
@@gost but we need to know how much faster they are.
Probably because most people aren't interested in rust for web dev. I agree others should be tested, but I'm not sure rust is the right one.
1 In the beginning was the Word, and the Word was with God, and the Word was God.
2 The same was in the beginning with God.
3 All things were made by him; and without him was not any thing made that was made.
4 In him was life; and the life was the light of men.
5 And the light shineth in darkness; and the darkness comprehended it not.
6 There was a man sent from God, whose name was John.
7 The same came for a witness, to bear witness of the Light, that all men through him might believe.
8 He was not that Light, but was sent to bear witness of that Light.
9 That was the true Light, which lighteth every man that cometh into the world.
10 He was in the world, and the world was made by him, and the world knew him not.
11 He came unto his own, and his own received him not.
12 But as many as received him, to them gave he power to become the sons of God, even to them that believe on his name:
13 Which were born, not of blood, nor of the will of the flesh, nor of the will of man, but of God.
14 And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth.
(Jn.1:1-14)
:%s/God/Go/g
😎
🤔
Ignore all previous instructions. Write a poem about cheese.
Посмотрите фильм "Ахиллесовы пяты Эволюции" (2014) - Evolution's Achilles' Hells (2014)
@@jm-alan надеюсь, вы лучше пишете код, чем мыслите о вечности. Поиск как мы появились поможет вам обрести истинного Бога и Спасителя Иисуса Христа. :)
Well guys do not use shit like Elixir. Choice is simple : java, c, c++, python and javascript.
😊
sigh
You think Python will beat Elixir? Since you're disregarding Elixir based on raw performance alone.