Configuration options

Table 1. Optional configuration options
key type default value description

backlog

int

1024

Accept backlog.

concurrency-limit

io.helidon.common.concurrency.limits.Limit (service provider interface)

Such as:

 

Concurrency limit to use to limit concurrent execution of incoming requests. The default is to have unlimited concurrency.

Note that if maxConcurrentRequests() is configured, this is ignored.

connection-config

 

Deprecated Configuration of a connection (established from client against our server).

@deprecated use connectionOptions() instead

connection-options

 

Options for connections accepted by this listener. This is not used to setup server connection.

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.

enable-proxy-protocol

boolean

false

Enable proxy protocol support for this socket. This protocol is supported by some load balancers/reverse proxies as a means to convey client information that would otherwise be lost. If enabled, the proxy protocol header must be present on every new connection established with your server. For more information, see the specification. Default is false.

error-handling

io.helidon.webserver.ListenerConfigBlueprint.create()

Configuration for this listener’s error handling.

host

string

0.0.0.0

Host of the default socket. Defaults to all host addresses (0.0.0.0).

idle-connection-period

Duration

PT2M

How often should we check for idleConnectionTimeout(). Defaults to PT2M (2 minutes).

idle-connection-timeout

Duration

PT5M

How long should we wait before closing a connection that has no traffic on it. Defaults to PT5M (5 minutes). Note that the timestamp is refreshed max. once per second, so this setting would be useless if configured for shorter periods of time (also not a very good support for connection keep alive, if the connections are killed so soon anyway).

ignore-invalid-named-routing

boolean

 

If set to true, any named routing configured that does not have an associated named listener will NOT cause an exception to be thrown (default behavior is to throw an exception).

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 -1, meaning "unlimited" - what the system allows. Also make sure that this number is higher than the expected time it takes to handle a single request in your application, as otherwise you may stop in-progress requests.

Setting this option will always ignore concurrencyLimit() and will use the io.helidon.common.concurrency.limits.FixedLimit.

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.

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 (-1).

max-tcp-connections

int

-1

Limits the number of connections that can be opened at a single point in time. Defaults to -1, meaning "unlimited" - what the system allows.

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.

name

string

@default

Name of this socket. Defaults to @default. Must be defined if more than one socket is needed.

port

int

0

Port of the default socket. If configured to 0 (the default), server starts on a random port.

protocols

io.helidon.webserver.spi.ProtocolConfig[] (service provider interface)

Such as:

 

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:

protocols:
  providers:
    http_1_1:
      max-prologue-length: 8192
    http_2:
      max-frame-size: 4096
    websocket:
      ....

receive-buffer-size

int

 

Deprecated Listener receive buffer size.

@deprecated use SocketOptions.socketReceiveBufferSize() instead via connectionOptions().

requested-uri-discovery

 

Requested URI discovery context.

restore-response-headers

boolean

true

Copy and restore response headers before and after passing a request to Jersey for processing. If Jersey fails to handle the request, and the Webserver continues processing the request, it needs to make sure the original headers are restored. Turn off this flag to avoid the extra overhead of copying headers when no handler executes after Jersey returns.

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 500 milliseconds. Configuration file values example: PT0.5S, PT2S.

smart-async-writes

boolean

false

If enabled and writeQueueLength() is greater than 1, then start with async writes but possibly switch to sync writes if async queue size is always below a certain threshold.

tls

Tls

 

Listener TLS configuration.

write-buffer-size

int

4096

Initial buffer size in bytes of java.io.BufferedOutputStream created internally to write data to a socket connection. Default is 4096. Set buffer size to a value less than one to turn off buffering.

write-queue-length

int

0

Number of buffers queued for write operations.