我有一个旧的应用程序,使用喷雾,我将它升级到Akka HTTP。在配置中,我有spray.can.host-connector.pipelining = on。Akka HTTP似乎不再有这个配置密钥了。相反,它有akka.http.host-connection-pool.pipelining-limit = 1 (默认情况下)。我假设pipelining-limit = 1实际上意味着没有流水线。如果是这样的话,那么什么值相当于喷射pipelining = on
发布于 2016-12-03 18:52:14
pipelining-limit设置允许您选择HTTP-流水线的“宽度”,即在任何给定时间可以有多少在飞行中的请求。
来自用于管道限制的文档(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.请注意,这也存在于喷雾中。事实上,设置spray.can.host-connector.pipelining = on不足以在Spray中启用流水线,您还需要spray.can.server.pipelining-limit严格大于1。
看起来他们在Akka中所做的是通过删除布尔设置来简化这个配置。可以通过设置大于1的限制来明确启用流水线。
https://stackoverflow.com/questions/40946903
复制相似问题