Keep connection open?
Closed this issue · 2 comments
Currently the benchmark scripts close the connection after writing the HTTP response, but in HTTP/1.1 all connections are considered persistent by default. The wrk tool knows how to keep persistent connections, and from my experience persistent connections can have a substantial impact on the server's performance.
This would also require adding more logic to the server code, which might require properly parsing the request etc. Another possibility would be to just implement scripts for an echo server and use the same benchmarking code from the Python shootout you mention in your README.
If we keep the connections open, the numbers will increase, you are right. However i was curious about the overhead of a new connection (and creating a Fiber or Thread or whatever).
I think the current benchmark is good for that.
If you are interested in other benchmarks i would be happy to include it here, but I do not have the time to make more versions at the moment. (Using more Threads or Ractors with Fibers should increase the numbers significantly i guess)
I agree with the current design and rationale.