akka / akka-http

The Streaming-first HTTP server/module of Akka
https://doc.akka.io/docs/akka-http
Other
1.34k stars 594 forks source link

Add batching to Stream TCP #176

Open ktoso opened 8 years ago

ktoso commented 8 years ago

Issue by ktoso Monday Nov 30, 2015 at 13:19 GMT Originally opened as https://github.com/akka/akka/issues/19048


The previous stream TCP impl did batching, the current one does not which likely has lessened its performance.

In essence we want to have a generic stage that can collapse multiple incoming ByteStrings into one bigger one. This is likely useful on it's own, but esp. in the Tcp pipeline.

ktoso commented 8 years ago

Comment by drewhk Monday Nov 30, 2015 at 13:25 GMT


On the other hand, this is what TCP_NODELAY off is for (default is on), so I think we should bench.

ktoso commented 8 years ago

Comment by rkuhn Tuesday Mar 22, 2016 at 07:44 GMT


If we can avoid system calls then we should: smart batching (i.e. conflate) sounds like something that will be beneficial.

ktoso commented 8 years ago

Comment by drewhk Tuesday Mar 22, 2016 at 08:07 GMT


Not conflate but batch since it has a cap (and cost function). It was designed for exactly these situations.

ktoso commented 8 years ago

Comment by drewhk Tuesday Mar 22, 2016 at 08:07 GMT


and it should be measured whether there is a performance effect or not.