3 ms·
Could even switch over to Bandit which was on a recent Thinking Elixir podcast > In recent performance tests, Bandit's HTTP/1.x engine is up to 5x faster than
by h0l0cube 4y ago
Could even switch over to Bandit which was on a recent Thinking Elixir podcast
> In recent performance tests, Bandit's HTTP/1.x engine is up to 5x faster than Cowboy depending on the number of concurrent requests. When comparing HTTP/2 performance, Bandit is up to 2.3x faster than Cowboy
https://github.com/mtrudel/bandit https://github.com/mtrudel/bandit
- tiffanyh 4y agoThat’s a great point and Phoenix 1.7 is the first release to support the usage of other web servers. 2-5x speed up would make Erlang surprise Java/Go/etc. https://stressgrid.com/blog/webserver_benchmark/ https://stressgrid.com/blog/webserver_benchmark/
- h0l0cube 4y agoBandit is written in pure Elixir which is a bit undesirable to integrate with pure Erlang projects. From what I gleaned off the podcast, it's a subset of the HTTP features available in Cowboy, specifically those that are available on the Phoenix side, and cleaving off the unused functionality realized much of the performance benefit.
- mcmatterson 4y agoBandit author here. Correct! The byline of Bandit is ‘a web server for Plug applications’ and being able to focus on that narrowed set of requirements is a large part of where the perf boost comes from (less code, easier to reason about, fewer processes, etc).
- eclark 4y agoI don't think that 1.7 is going to really have bandit fully supported on launch: https://github.com/phoenixframework/phoenix/pull/5071 https://github.com/phoenixframework/phoenix/pull/5071 Once it is supported though, I will be on that for sure.
- mcmatterson 4y agoBandit author here. We’re fully supported on phx 1.7+; it’s a one line change to your existing app, described on the Bandit readme!
- mcmatterson 4y agoThe PR you linked to adds support for generating new phx apps with the relevant change already incorporated; it’s just a generator change. We’re waiting a bit to incorporate this change to ‘soft launch’ Bandit support.