Class NettyConfig


  • public class NettyConfig
    extends java.lang.Object
    Configuration parameters required by Netty.
    • Field Detail

      • NETTY_SERVER_BOSS_THREAD_COUNT

        public static final java.lang.String NETTY_SERVER_BOSS_THREAD_COUNT
        See Also:
        Constant Field Values
      • NETTY_SERVER_IDLE_TIME_SECONDS

        public static final java.lang.String NETTY_SERVER_IDLE_TIME_SECONDS
        See Also:
        Constant Field Values
      • NETTY_SERVER_PORT

        public static final java.lang.String NETTY_SERVER_PORT
        See Also:
        Constant Field Values
      • NETTY_SERVER_SSL_PORT

        public static final java.lang.String NETTY_SERVER_SSL_PORT
        See Also:
        Constant Field Values
      • NETTY_SERVER_ENABLE_SSL

        public static final java.lang.String NETTY_SERVER_ENABLE_SSL
        See Also:
        Constant Field Values
      • NETTY_SERVER_SO_BACKLOG

        public static final java.lang.String NETTY_SERVER_SO_BACKLOG
        See Also:
        Constant Field Values
      • NETTY_SERVER_WORKER_THREAD_COUNT

        public static final java.lang.String NETTY_SERVER_WORKER_THREAD_COUNT
        See Also:
        Constant Field Values
      • NETTY_SERVER_MAX_INITIAL_LINE_LENGTH

        public static final java.lang.String NETTY_SERVER_MAX_INITIAL_LINE_LENGTH
        See Also:
        Constant Field Values
      • NETTY_SERVER_MAX_HEADER_SIZE

        public static final java.lang.String NETTY_SERVER_MAX_HEADER_SIZE
        See Also:
        Constant Field Values
      • NETTY_SERVER_MAX_CHUNK_SIZE

        public static final java.lang.String NETTY_SERVER_MAX_CHUNK_SIZE
        See Also:
        Constant Field Values
      • NETTY_SERVER_REQUEST_BUFFER_WATERMARK

        public static final java.lang.String NETTY_SERVER_REQUEST_BUFFER_WATERMARK
        See Also:
        Constant Field Values
      • NETTY_SERVER_BLACKLISTED_QUERY_PARAMS

        public static final java.lang.String NETTY_SERVER_BLACKLISTED_QUERY_PARAMS
        See Also:
        Constant Field Values
      • NETTY_MULTIPART_POST_MAX_SIZE_BYTES

        public static final java.lang.String NETTY_MULTIPART_POST_MAX_SIZE_BYTES
        See Also:
        Constant Field Values
      • NETTY_METRICS_REFRESH_INTERVAL_SECONDS

        public static final java.lang.String NETTY_METRICS_REFRESH_INTERVAL_SECONDS
        See Also:
        Constant Field Values
      • NETTY_METRICS_STOP_WAIT_TIMEOUT_SECONDS

        public static final java.lang.String NETTY_METRICS_STOP_WAIT_TIMEOUT_SECONDS
        See Also:
        Constant Field Values
      • NETTY_SERVER_CLOSE_DELAY_TIMEOUT_MS

        public static final java.lang.String NETTY_SERVER_CLOSE_DELAY_TIMEOUT_MS
        See Also:
        Constant Field Values
      • nettyServerBossThreadCount

        @Config("netty.server.boss.thread.count")
        @Default("1")
        public final int nettyServerBossThreadCount
        Number of netty boss threads.
      • nettyServerIdleTimeSeconds

        @Config("netty.server.idle.time.seconds")
        @Default("60")
        public final int nettyServerIdleTimeSeconds
        The amount of time a channel is allowed to be idle before it's closed. 0 to disable.
      • nettyServerPort

        @Config("netty.server.port")
        @Default("1174")
        public final int nettyServerPort
        Port on which to run netty server for plaintext connections.
      • nettyServerSSLPort

        @Config("netty.server.ssl.port")
        @Default("1175")
        public final int nettyServerSSLPort
        Port on which to run netty server for SSL connections.
      • nettyServerEnableSSL

        @Config("netty.server.enable.ssl")
        @Default("false")
        public final boolean nettyServerEnableSSL
        Enable the netty server SSL port.
      • nettyServerSoBacklog

        @Config("netty.server.so.backlog")
        @Default("100")
        public final int nettyServerSoBacklog
        Socket backlog size. Defines the number of connections that can wait in queue to be accepted.
      • nettyServerWorkerThreadCount

        @Config("netty.server.worker.thread.count")
        @Default("1")
        public final int nettyServerWorkerThreadCount
        Number of netty worker threads.
      • nettyServerMaxInitialLineLength

        @Config("netty.server.max.initial.line.length")
        @Default("4096")
        public final int nettyServerMaxInitialLineLength
        The maximum length of the initial line in a request (in bytes).
      • nettyServerMaxHeaderSize

        @Config("netty.server.max.header.size")
        @Default("8192")
        public final int nettyServerMaxHeaderSize
        The maximum size of a header in a request (in bytes).
      • nettyServerMaxChunkSize

        @Config("netty.server.max.chunk.size")
        @Default("8192")
        public final int nettyServerMaxChunkSize
        The maximum size of a chunk that is prepared for processing (in bytes).
      • nettyServerRequestBufferWatermark

        @Config("netty.server.request.buffer.watermark")
        @Default("32 * 1024 * 1024")
        public final int nettyServerRequestBufferWatermark
        The threshold of the size of buffered data at which reading from a client channel will be suspended. If the size drops below the threshold, reading will be resumed. This value is respected on a per-request basis. Note that the actual amount of data buffered may be >= this number. If this is <=0, it is assumed that there is no limit on the size of buffered data.
      • nettyBlacklistedQueryParams

        @Config("netty.server.blacklisted.query.params")
        @Default("")
        public final java.util.Set<java.lang.String> nettyBlacklistedQueryParams
        A comma separated list of query parameters that should not be honored when forwarded to the RestRequestService layer.
      • nettyMultipartPostMaxSizeBytes

        @Config("netty.multipart.post.max.size.bytes")
        @Default("20 * 1024 * 1024")
        public final long nettyMultipartPostMaxSizeBytes
        The threshold (in bytes) for POSTs via multipart/form-data.

        The current netty implementation cannot stream POSTs that come as multipart/form-data. It is useful to set this to reasonable number to ensure that memory usage is kept in check (i.e. protect against large blob uploads via multipart/form-data).

      • nettyServerSslFactory

        @Config("netty.server.ssl.factory")
        @Default("")
        public final java.lang.String nettyServerSslFactory
        If set, use this implementation of SSLFactory to use for the netty HTTP server. Otherwise, share the factory instance with the router.
      • nettyMetricsRefreshIntervalSeconds

        @Config("netty.metrics.refresh.interval.seconds")
        @Default("30")
        public final int nettyMetricsRefreshIntervalSeconds
        The interval to update netty metrics in the collecting thread.
      • nettyMetricsStopWaitTimeoutSeconds

        @Config("netty.metrics.stop.wait.timeout.seconds")
        @Default("1")
        public final int nettyMetricsStopWaitTimeoutSeconds
        The duration to wait for netty metrics collector to stop before forcelly shutting it down.
      • nettyServerCloseDelayTimeoutMs

        @Config("netty.server.close.delay.timeout.ms")
        @Default("0")
        public final int nettyServerCloseDelayTimeoutMs
        The duration to wait for before closing the netty channel in case of failures.