if (vars) {
parseLocalBindVars(vars, reusePort, tcpFastOpenQueueSize, interface, cpus, tcpListenQueueSize, maxInFlightQueriesPerConn, tcpMaxConcurrentConnections);
-
+ if (maxInFlightQueriesPerConn > 0) {
+ frontend->d_maxInFlight = maxInFlightQueriesPerConn;
+ }
getOptionalValue<int>(vars, "internalPipeBufferSize", frontend->d_internalPipeBufferSize);
getOptionalValue<int>(vars, "idleTimeout", frontend->d_idleTimeout);
* ``cpus={}``: table - Set the CPU affinity for this listener thread, asking the scheduler to run it on a single CPU id, or a set of CPU ids. This parameter is only available if the OS provides the pthread_setaffinity_np() function.
* ``idleTimeout=5``: int - Set the idle timeout, in seconds.
* ``internalPipeBufferSize=0``: int - Set the size in bytes of the internal buffer of the pipes used internally to pass queries and responses between threads. Requires support for ``F_SETPIPE_SZ`` which is present in Linux since 2.6.35. The actual size might be rounded up to a multiple of a page size. 0 means that the OS default size is used. The default value is 0, except on Linux where it is 1048576 since 1.6.0.
+ * ``maxInFlight=0``: int - Maximum number of in-flight queries. The default is 0, which disables out-of-order processing.
.. function:: addTLSLocal(address, certFile(s), keyFile(s) [, options])
quiche_config_set_max_idle_timeout(config.get(), d_idleTimeout * 1000);
quiche_config_set_max_recv_udp_payload_size(config.get(), MAX_DATAGRAM_SIZE);
quiche_config_set_max_send_udp_payload_size(config.get(), MAX_DATAGRAM_SIZE);
- quiche_config_set_initial_max_data(config.get(), 10000000);
- quiche_config_set_initial_max_stream_data_bidi_local(config.get(), 1000000);
- quiche_config_set_initial_max_stream_data_bidi_remote(config.get(), 1000000);
- quiche_config_set_initial_max_streams_bidi(config.get(), 100);
+
+ // The number of concurrent remotely-initiated bidirectional streams to be open at any given time
+ // https://docs.rs/quiche/latest/quiche/struct.Config.html#method.set_initial_max_streams_bidi
+ // 0 means none will get accepted, that's why we have a default value of 65535
+ quiche_config_set_initial_max_streams_bidi(config.get(), d_maxInFlight);
+
+ // The number of bytes of incoming stream data to be buffered for each localy or remotely-initiated bidirectional stream
+ quiche_config_set_initial_max_stream_data_bidi_local(config.get(), 8192);
+ quiche_config_set_initial_max_stream_data_bidi_remote(config.get(), 8192);
+
+ // The number of total bytes of incoming stream data to be buffered for the whole connection
+ // https://docs.rs/quiche/latest/quiche/struct.Config.html#method.set_initial_max_data
+ quiche_config_set_initial_max_data(config.get(), 8192 * d_maxInFlight);
+
quiche_config_set_cc_algorithm(config.get(), QUICHE_CC_RENO);
{