ebarlas / microhttp

Fast, scalable, self-contained, single-threaded Java web server
MIT License
539 stars 54 forks source link

WIP: Reuse writeBuffer per connection #5

Closed rbygrave closed 2 years ago

rbygrave commented 2 years ago

Noting as per discussion this needs work with the view of enabling handler code to write to a "response outputstream" that goes to a buffer that is recycled.

ebarlas commented 2 years ago

@rbygrave , you might be interested in some of the recent changes to Microhttp. In TechEmpower Benchmarks, Microhttp is achieving over 2,000,000 requests per second in the plaintext test and it's out performing Jetty in all three benchmarks implemented (plaintext, JSON, DB query).

https://www.techempower.com/benchmarks/#section=test&runid=c72182f8-476d-4920-a264-26f615d693d3&test=plaintext

It's now multi-threaded. And shared direct/heap buffers are used for reads and writes.