I have an old application that uses Spray and I'm upgrading it to Akka HTTP. In the config, I have spray.can.host-connector.pipelining = on
. Akka HTTP doesn't appear to have this config key anymore. Instead, it has akka.http.host-connection-pool.pipelining-limit = 1
(by default). I assume that pipelining-limit = 1
means effectively no pipelining. If that's the case, then what value would be equivalent to Sprays pipelining = on
?
Asked
Active
Viewed 188 times
0

user3427070
- 499
- 5
- 14
1 Answers
0
The pipelining-limit
setting allows you to choose the 'breadth' of your HTTP-pipelining, i.e. how many in-flight request there can be at any given time.
From the docs for pipelining-limit (http://doc.akka.io/docs/akka-http/current/scala/http/configuration.html)
# The maximum number of requests that are dispatched to the target host in
# batch-mode across a single connection (HTTP pipelining).
# A setting of 1 disables HTTP pipelining, since only one request per
# connection can be "in flight" at any time.
# Set to higher values to enable HTTP pipelining.
# This value must be > 0.
Please note that this is present in Spray as well. In fact, setting spray.can.host-connector.pipelining = on
is not enough to enable pipelining in Spray, you also need spray.can.server.pipelining-limit
to be strictly greater than 1.
It looks like what they did in Akka-HTTP is simplifying this configuration by removing the Boolean setting. Pipelining can be unambiguously enabled by setting a limit higher than 1.

Stefano Bonetti
- 8,973
- 1
- 25
- 44