reactive-streams

How to properly call Akka HTTP client for multiple (10k - 100k) requests?

微笑、不失礼 提交于 2019-11-27 05:34:03
问题 I'm trying to write a tool for batch data upload using Akka HTTP 2.0-M2. But I'm facing akka.stream.OverflowStrategy$Fail$BufferOverflowException: Exceeded configured max-open-requests value of [32] error. I tried to isolate a problem and here is the sample code which also fails: public class TestMaxRequests { private static final class Router extends HttpApp { @Override public Route createRoute() { return route( path("test").route( get(handleWith(ctx -> ctx.complete("OK"))) ) ); } } public

Akka-Stream implementation slower than single threaded implementation

我怕爱的太早我们不能终老 提交于 2019-11-26 16:44:56
问题 UPDATE FROM 2015-10-30 based on Roland Kuhn Awnser: Akka Streams is using asynchronous message passing between Actors to implement stream processing stages. Passing data across an asynchronous boundary has an overhead that you are seeing here: your computation seems to take only about 160ns (derived from the single-threaded measurement) while the streaming solution takes roughly 1µs per element, which is dominated by the message passing. Another misconception is that saying “stream” implies