Default socket interface configuration (proto)
extensions.network.socket_interface.v3.DefaultSocketInterface
[extensions.network.socket_interface.v3.DefaultSocketInterface proto]
Configuration for the default socket interface that relies on OS-dependent syscalls to create sockets.
{
"io_uring_options": {...}
}
- io_uring_options
(extensions.network.socket_interface.v3.IoUringOptions) Options for
io_uring-based socket I/O.io_uringis only supported on Linux with kernel version 5.11 or later. On unsupported platforms, Envoy falls back to the default socket API.Note
If not set,
io_uringwill not be enabled and the standard epoll-based I/O path is used.
extensions.network.socket_interface.v3.IoUringOptions
[extensions.network.socket_interface.v3.IoUringOptions proto]
Configuration for io_uring-based asynchronous I/O.
Each worker thread creates its own io_uring instance during initialization. Operations
are submitted to the submission queue (SQ) and completions are reaped from the completion
queue (CQ) via an eventfd integrated with the worker’s event loop.
Warning
io_uring support is experimental and its performance characteristics depend heavily on
the kernel version.
{
"io_uring_size": {...},
"enable_submission_queue_polling": ...,
"read_buffer_size": {...},
"write_timeout_ms": {...},
"write_high_watermark_bytes": {...},
"write_low_watermark_bytes": {...},
"enable_multishot_receive": ...
}
- io_uring_size
(UInt32Value) The number of entries in the
io_uringsubmission queue (SQ). Each in-flight I/O operation requires one SQE. The completion queue (CQ) is sized at2xthis value to provide overflow headroom. If not specified, defaults to 1000.
- enable_submission_queue_polling
(bool) Enables
io_uringsubmission queue polling (SQPOLL). When enabled, a dedicated kernel thread polls the SQ for new entries, eliminating theio_uring_enter()syscall on submission. This may reduce latency at the cost of increased CPU usage. If not specified, defaults to false.
- read_buffer_size
(UInt32Value) The starting size in bytes of the buffer for each
readv-basedio_uringread. Envoy grows the next read up to 16 times this size while reads keep filling the buffer and resets it otherwise, so large transfers use fewer reads. Whenenable_multishot_receiveis set, this is also the size of each kernel-provided buffer. If not specified, defaults to 8192.
- write_timeout_ms
(UInt32Value) The timeout in milliseconds to wait for pending write operations to complete when closing a socket.
io_uringwrites are asynchronous. If the remote peer stops reading, a write may never complete. After this timeout, pending writes are canceled and the socket is closed. If not specified, defaults to 1000.
- write_high_watermark_bytes
(UInt32Value) The high watermark in bytes for the write buffer. When the amount of pending write data exceeds this threshold, the socket stops accepting new writes from the connection so that backpressure propagates to the upper layers. If not specified, defaults to 131072 (128 KiB). When set, the value must be at least 4096 (4 KiB).
- write_low_watermark_bytes
(UInt32Value) The low watermark in bytes for the write buffer. After the buffer has exceeded
write_high_watermark_bytesand writes were paused, the socket resumes accepting writes once the pending write data drops to or below this value. If not specified, defaults to 16384 (16 KiB). When set, the value must be at least 1024 (1 KiB).Note
This value must be less than
write_high_watermark_bytes. If misconfigured, it is clamped towrite_high_watermark_bytes / 2.
- enable_multishot_receive
(bool) Enables
multishotreads backed by a kernel-provided buffer ring. A singlerecvis armed per socket and the kernel keeps delivering data as it arrives without a new submission per read, which reduces event loop wakeups and read submissions for read-heavy workloads. The ring holdsio_uring_sizebuffers rounded up to a power of two and capped at 4096, eachread_buffer_sizebytes, so each worker thread uses up to that buffer count timesread_buffer_sizebytes for the pool. Requires Linux kernel 6.0 or later. On older kernels, Envoy falls back toreadv-based reads. If not specified, defaults to false.