pub struct Config {
pub registry: Arc<Mutex<Registry>>,
pub threads: usize,
pub catch_panics: bool,
pub read_timeout: Duration,
pub write_timeout: Duration,
pub tcp_nodelay: Option<bool>,
pub storage_directory: PathBuf,
pub maximum_buffer_size: usize,
}
Expand description
Configuration for the tokio
runtime.
Fields§
§registry: Arc<Mutex<Registry>>
Registry for metrics.
threads: usize
Number of threads to use for the runtime.
catch_panics: bool
Whether or not to catch panics.
read_timeout: Duration
Duration after which to close the connection if no message is read.
write_timeout: Duration
Duration after which to close the connection if a message cannot be written.
tcp_nodelay: Option<bool>
Whether or not to disable Nagle’s algorithm.
The algorithm combines a series of small network packets into a single packet before sending to reduce overhead of sending multiple small packets which might not be efficient on slow, congested networks. However, to do so the algorithm introduces a slight delay as it waits to accumulate more data. Latency-sensitive networks should consider disabling it to send the packets as soon as possible to reduce latency.
Note: Make sure that your compile target has and allows this configuration otherwise panics or unexpected behaviours are possible.
storage_directory: PathBuf
Base directory for all storage operations.
maximum_buffer_size: usize
Maximum buffer size for operations on blobs.
tokio
defaults this value to 2MB.