- WebServer (webserver) Configuration
Type: io.helidon.webserver.WebServer
This is a standalone configuration type, prefix from configuration root:
server
Configuration options
| key | type | default value | description |
|---|---|---|---|
backlog | int | 1024 | Accept backlog. @return backlog |
connection-config | Configuration of a connection (established from client against our server). @return connection configuration | ||
connection-options | Options for connections accepted by this listener. This is not used to setup server connection. @return socket options | ||
content-encoding | Configure the listener specific io.helidon.http.encoding.ContentEncodingContext. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, content encoding context of the webserver would be used. @return content encoding context | ||
features | io.helidon.webserver.spi.ServerFeature[] (service provider interface) Such as: | Server features allow customization of the server, listeners, or routings. @return server features | |
host | string | 0.0.0.0 | Host of the default socket. Defaults to all host addresses ( @return host address to listen on (for the default socket) |
idle-connection-period | Duration | PT2M | How often should we check for #idleConnectionTimeout(). Defaults to @return period of checking for idle connections |
idle-connection-timeout | Duration | PT5M | How long should we wait before closing a connection that has no traffic on it. Defaults to @return timeout of idle connections |
max-concurrent-requests | int | -1 | Limits the number of requests that can be executed at the same time (the number of active virtual threads of requests). Defaults to @return number of requests that can be processed on this listener, regardless of protocol |
max-in-memory-entity | int | 131072 | If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance when writing it. If bigger, streaming will be used. Note that for some entity types we cannot use streaming, as they are already fully in memory (String, byte[]), for such cases, this option is ignored. Default is 128Kb. @return maximal number of bytes to buffer in memory for supported writers |
max-payload-size | long | -1 | Maximal number of bytes an entity may have. If io.helidon.http.HeaderNames#CONTENT_LENGTH is used, this is checked immediately, if io.helidon.http.HeaderValues#TRANSFER_ENCODING_CHUNKED is used, we will fail when the number of bytes read would exceed the max payload size. Defaults to unlimited ( @return maximal number of bytes of entity |
max-tcp-connections | int | -1 | Limits the number of connections that can be opened at a single point in time. Defaults to @return number of TCP connections that can be opened to this listener, regardless of protocol |
media-context | Configure the listener specific io.helidon.http.media.MediaContext. This method discards all previously registered MediaContext. If no media context is registered, media context of the webserver would be used. @return media context | ||
name | string | @default | Name of this socket. Defaults to @return name of the socket |
port | int | 0 | Port of the default socket. If configured to @return port to listen on (for the default socket) |
protocols | io.helidon.webserver.spi.ProtocolConfig[] (service provider interface) | Configuration of protocols. This may be either protocol selectors, or protocol upgraders from HTTP/1.1. As the order is not important (providers are ordered by weight by default), we can use a configuration as an object, such as: <pre> protocols: providers: http_1_1: max-prologue-length: 8192 http_2: max-frame-size: 4096 websocket: …. </pre> @return all defined protocol configurations, loaded from service loader by default | |
receive-buffer-size | int | Listener receive buffer size. @return buffer size in bytes | |
shutdown-grace-period | Duration | PT0.5S | Grace period in ISO 8601 duration format to allow running tasks to complete before listener’s shutdown. Default is @return grace period |
shutdown-hook | boolean | true | When true the webserver registers a shutdown hook with the JVM Runtime. Defaults to true. Set this to false such that a shutdown hook is not registered. @return whether to register a shutdown hook |
sockets | Socket configurations. Note that socket named @return map of listener configurations, except for the default one | ||
tls | Listener TLS configuration. @return tls of this configuration | ||
write-buffer-size | int | 512 | Initial buffer size in bytes of java.io.BufferedOutputStream created internally to write data to a socket connection. Default is @return initial buffer size used for writing |
write-queue-length | int | 0 | Number of buffers queued for write operations. @return maximal number of queued writes, defaults to 0 |