From a57a4d55e893d0ef73e592664780b81d4902ec65 Mon Sep 17 00:00:00 2001 From: Seva Date: Tue, 18 Jun 2019 13:55:26 -0400 Subject: [PATCH] dhtproxy: optimize for concurency --- src/dht_proxy_server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp index 5f9c41d5..2ef83ec5 100644 --- a/src/dht_proxy_server.cpp +++ b/src/dht_proxy_server.cpp @@ -119,7 +119,10 @@ DhtProxyServer::makeHttpServerSettings() * and calls state listener as expected. * https://github.com/Stiffstream/restinio/issues/28 */ - settings.max_pipelined_requests(2); + settings.max_pipelined_requests(16); + // one less to detect the listener disconnect + settings.concurrent_accepts_count(15); + settings.separate_accept_and_create_connect(true); settings.logger(logger_); settings.protocol(restinio::asio_ns::ip::tcp::v6()); settings.request_handler(this->createRestRouter());