TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Achieving 100k connections per second with Elixir

544 pointsby slashdotdashabout 6 years ago

13 comments

dzikabout 6 years ago
This article is quite good, especially part about bottleneck caused by single supervisor in ranch. However I have to say that title is a bit misleading because all of this has nothing to do with Elixir, it&#x27;s all about Linux kernel and Erlang, cowboy and ranch are written in Erlang.<p>Having said that, I will add that I think it is good to have Elixir.
评论 #19314843 未加载
评论 #19312613 未加载
评论 #19312570 未加载
评论 #19313732 未加载
rargulatiabout 6 years ago
I&#x27;d love to see data on the average on-call incidents for an application written in language X (say Go) vs those written in Elixir.<p>Concretely, its it the case, for an application where Elixir&#x2F;Erlang&#x2F;Beam are a great choice, but also, another language would be fine, that the equivalent Elixir application results in less downtime&#x2F;pages than the alternative. Anything from the perfect app to something with a ton of races&#x2F;leaks.<p>Is this a fair question (maybe I&#x27;m presuming too much of BEAM&#x2F;supervisor pattern, I zero experience with it)?
评论 #19316201 未加载
评论 #19315276 未加载
评论 #19315446 未加载
vasiliaabout 6 years ago
I can handle 120k connections per second with my custom made, highly optimized multiprocess C++ server. But the main problem is business logic. Just make 2 SQL queries to MySQL on each HTTP request and look at how it will degrade.
评论 #19316206 未加载
评论 #19314498 未加载
dnekencjfkerfabout 6 years ago
&gt; What this means, performance-wise, is that measuring requests per second gets a lot more attention than connections per second. Usually, the latter can be one or two orders of magnitude lower than the former.<p>does anyone know how does 100k connections compare with other servers?
评论 #19313445 未加载
评论 #19313989 未加载
评论 #19313717 未加载
评论 #19313527 未加载
holtalanmabout 6 years ago
im a simple man. i see Elixir, i upvote.<p>that being said, this article was pretty informative. The bit about the proposed SO_REUSEPORT socket option was really interesting. Really fun to read about performance bottleneck detection and improvement.<p>edit: wow, downvoting for making a simple joke about liking elixir. Cool.
评论 #19317042 未加载
评论 #19319396 未加载
supermattabout 6 years ago
Id like to see memory consumption charts for this. It seems you miss this on all your posts. Not a criticism (and thank you for what you have done), its just something I (and others) would like to see, and if you are running the tests its just another metric to log :D<p>Also, any update on your previous article? <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19094233" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19094233</a>
评论 #19320206 未加载
Leaceabout 6 years ago
ejabberd [0], XMPP server is written in erlang and powers chat in some of the biggest MMORPGs [1].<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;processone&#x2F;ejabberd" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;processone&#x2F;ejabberd</a><p>[1]: <a href="https:&#x2F;&#x2F;xmpp.org&#x2F;uses&#x2F;gaming.html" rel="nofollow">https:&#x2F;&#x2F;xmpp.org&#x2F;uses&#x2F;gaming.html</a>
评论 #19315270 未加载
confoundedabout 6 years ago
Is Elixir&#x2F;Erlang considered superior to Go for writing high concurrency web servers?
评论 #19314220 未加载
评论 #19314174 未加载
评论 #19314195 未加载
评论 #19314373 未加载
评论 #19314248 未加载
评论 #19313978 未加载
muststopmythsabout 6 years ago
&gt;Finally, the connections per second rate reaches 99k, with network latency and available CPU resources contributing to the next bottleneck.<p>Can someone educate me on what they might talking about here ? CPU is ~45% in their final graph. I don&#x27;t know what network latency means in this context though. Roundtrip for a TCP handshake ? That seems unlikely.
评论 #19312885 未加载
评论 #19312823 未加载
makkesk8about 6 years ago
Even if connections per second can be a magnitude or two lower than requests per second this result is still quite off by today&#x27;s alternative.<p>14 core machine comparing .net core with other top webservers: <a href="https:&#x2F;&#x2F;www.ageofascent.com&#x2F;2019&#x2F;02&#x2F;04&#x2F;asp-net-core-saturating-10gbe-at-7-million-requests-per-second&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ageofascent.com&#x2F;2019&#x2F;02&#x2F;04&#x2F;asp-net-core-saturati...</a>
评论 #19312994 未加载
评论 #19313012 未加载
评论 #19312953 未加载
评论 #19312918 未加载
dclusinabout 6 years ago
Would be helpful to know the hardware&#x2F;instance size they used for these tests. TFA doesn&#x27;t explicitly state it.
评论 #19312422 未加载
评论 #19312415 未加载
fabioyyabout 6 years ago
Opening a conection and closing after a while is not very good example os &quot;scalability&quot; ... the kernel does the opening part... reply
cutlerabout 6 years ago
Great, I can use this for that blogging app I&#x27;ve been meaning to write and sleep at night knowing I won&#x27;t run out of connections.