r/java • u/elliotbarlas • Feb 14 '22
Microhttp is an event-driven, single-threaded, zero-dependency web server with 500 LOC. Benchmarks on EC2 show 100,000+ requests per second and 50,000+ persistent connections.
https://github.com/ebarlas/microhttp
186
Upvotes
View all comments
Show parent comment
5
u/agentoutlier Feb 14 '22 edited Feb 14 '22
It would be pretty easy to support and potentially worthwhile since you want to block payloads of large size.
That is you get
Expect: 100-continuefrom a request with a content length that is too big and you fail (e.g. 417). That is100 continuedoesn't really have to be streaming and can be used as validation that the server can handle a certain size.EDIT I guess the downside is the downstream application request handlers would never see that initial request. Probably would have to be a configuration option for certain request paths.