diff options
author | Carson Labrado <clabrado@google.com> | 2022-12-08 01:34:33 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-02-23 02:11:15 +0300 |
commit | 66d90c2cb505d899373f17be468e730e88fe2345 (patch) | |
tree | fc29b7dddd60e76ca1c9c74ab7e498d394e7bd21 /http/http_client.hpp | |
parent | 4e7f931b2cd4403adecf34946efa66acd10c9d0a (diff) | |
download | bmcweb-66d90c2cb505d899373f17be468e730e88fe2345.tar.xz |
HTTP Client: Increase max conns and reqs
With Redfish Aggregation there is a need for a large amount of
requests to be sent to a satellite BMC. Our current throughput of
4 connections with a 50 request buffer can be easily overwhelmed due
to the use of $expand. Also, BMCWeb itself can support 100 active
connections so multiple clients could be attempting to query a
satellite BMC that is being aggregated.
Increase the maximum number of connections to a destination to 20 and
increase the buffer request size to 500. These figures should be fine
since the requests themselves have a very small memory footprint and
the number of active connections is only a fifth of what the BMCWeb
in the satellite BMC should be able to support.
Note that these figures are an improvement over the current values.
They allowed making multi-level $expand requests without dropping any
subrequests due to the buffer becoming full. Further tuning will be
done in a future patch if it is determined that optimal performance can
be obtained by choosing different values.
Tested:
Debug logs after sending a multi-level $expand query showed the entire
connection pool being filled as well as well over 100 Requests being
queued. The additional connections provided enough throughput to
handle repeated simultaneous requests.
Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I96f165b5fbc76086e55b65faaaa49eb2753f8ef6
Diffstat (limited to 'http/http_client.hpp')
-rw-r--r-- | http/http_client.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp index a2cd62eb8d..c902e1a66b 100644 --- a/http/http_client.hpp +++ b/http/http_client.hpp @@ -50,9 +50,10 @@ namespace crow { -// It is assumed that the BMC should be able to handle 4 parallel connections -constexpr uint8_t maxPoolSize = 4; -constexpr uint8_t maxRequestQueueSize = 50; +// With Redfish Aggregation it is assumed we will connect to another instance +// of BMCWeb which can handle 100 simultaneous connections. +constexpr size_t maxPoolSize = 20; +constexpr size_t maxRequestQueueSize = 500; constexpr unsigned int httpReadBodyLimit = 131072; constexpr unsigned int httpReadBufferSize = 4096; |