idi527
Cowboy1 and cowboy2 performance in a synthetic benchmark
So I wanted to see how much overhead plug actually adds to cowboy and I tried to add cowboy to the GitHub - the-benchmarker/web-frameworks: Which is the fastest web framework? · GitHub benchmark. It didn’t go quite as expected since cowboy 2.0-pre turned out to be much slower than plug there. So then I tried cowboy 1.1 which plug and phoenix use, but it still was a bit slower. Can maybe somebody with more experience with cowboys look into the code and maybe see ways to improve it?
my fork of the benchmark for
- cowboy 1.1 https://github.com/idi-ot/which_is_the_fastest/tree/8c3680d888c4e9e3b534f9d6b0cb44e83071896c/elixir/cowboy1
- cowboy 2.0-pre https://github.com/idi-ot/which_is_the_fastest/tree/8c3680d888c4e9e3b534f9d6b0cb44e83071896c/elixir/cowboy2
I think I’m using the same ranch options as plug (plug/lib/plug/adapters/cowboy.ex at main · elixir-plug/plug · GitHub) and splitting the path the same way (https://github.com/elixir-lang/plug/blob/master/lib/plug/adapters/cowboy/conn.ex#L92-L95), but something’s off.
Also, here’s the PR thread with some additional details add cowboy and elli · Pull Request #58 · the-benchmarker/web-frameworks · GitHub
First Post!
outlog
did you set max_keepalive 5_000_000 - important option in these keep_alive do nothing tests - see The Erlangelist - Low latency in Phoenix
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance










