Class Http2ClientConfig


  • public class Http2ClientConfig
    extends java.lang.Object
    The configs for HTTP/2 Client
    • Field Detail

      • HTTP2_MIN_CONNECTION_PER_PORT

        public static final java.lang.String HTTP2_MIN_CONNECTION_PER_PORT
        See Also:
        Constant Field Values
      • HTTP2_MAX_CONCURRENT_STREAMS_PER_CONNECTION

        public static final java.lang.String HTTP2_MAX_CONCURRENT_STREAMS_PER_CONNECTION
        See Also:
        Constant Field Values
      • HTTP2_NETTY_EVENT_LOOP_GROUP_THREADS

        public static final java.lang.String HTTP2_NETTY_EVENT_LOOP_GROUP_THREADS
        See Also:
        Constant Field Values
      • HTTP2_IDLE_CONNECTION_TIMEOUT_MS

        public static final java.lang.String HTTP2_IDLE_CONNECTION_TIMEOUT_MS
        See Also:
        Constant Field Values
      • HTTP2_MAX_CONTENT_LENGTH

        public static final java.lang.String HTTP2_MAX_CONTENT_LENGTH
        See Also:
        Constant Field Values
      • HTTP2_FRAME_MAX_SIZE

        public static final java.lang.String HTTP2_FRAME_MAX_SIZE
        See Also:
        Constant Field Values
      • HTTP2_INITIAL_WINDOW_SIZE

        public static final java.lang.String HTTP2_INITIAL_WINDOW_SIZE
        See Also:
        Constant Field Values
      • NETTY_RECEIVE_BUFFER_SIZE

        public static final java.lang.String NETTY_RECEIVE_BUFFER_SIZE
        See Also:
        Constant Field Values
      • NETTY_SEND_BUFFER_SIZE

        public static final java.lang.String NETTY_SEND_BUFFER_SIZE
        See Also:
        Constant Field Values
      • HTTP2_WRITE_AND_FLUSH_TIMEOUT_MS

        public static final java.lang.String HTTP2_WRITE_AND_FLUSH_TIMEOUT_MS
        See Also:
        Constant Field Values
      • HTTP2_DROP_REQUEST_ON_WRITE_AND_FLUSH_TIMEOUT

        public static final java.lang.String HTTP2_DROP_REQUEST_ON_WRITE_AND_FLUSH_TIMEOUT
        See Also:
        Constant Field Values
      • HTTP2_BLOCKING_CHANNEL_ACQUIRE_TIMEOUT_MS

        public static final java.lang.String HTTP2_BLOCKING_CHANNEL_ACQUIRE_TIMEOUT_MS
        See Also:
        Constant Field Values
      • HTTP2_BLOCKING_CHANNEL_SEND_TIMEOUT_MS

        public static final java.lang.String HTTP2_BLOCKING_CHANNEL_SEND_TIMEOUT_MS
        See Also:
        Constant Field Values
      • HTTP2_BLOCKING_CHANNEL_RECEIVE_TIMEOUT_MS

        public static final java.lang.String HTTP2_BLOCKING_CHANNEL_RECEIVE_TIMEOUT_MS
        See Also:
        Constant Field Values
      • HTTP2_BLOCKING_CHANNEL_POOL_SHUTDOWN_TIMEOUT_MS

        public static final java.lang.String HTTP2_BLOCKING_CHANNEL_POOL_SHUTDOWN_TIMEOUT_MS
        See Also:
        Constant Field Values
      • idleConnectionTimeoutMs

        @Config("http2.idle.connection.timeout.ms")
        @Default("-1")
        public final java.lang.Long idleConnectionTimeoutMs
        HTTP/2 connection idle time before we close it. -1 means no idle close.
      • http2MinConnectionPerPort

        @Config("http2.min.connection.per.port")
        @Default("2")
        public final int http2MinConnectionPerPort
        Minimum number of http2 connection per port we want to keep. Based on initial perf test, number of HTTP/2 connection is not a significant performance factor. 2 is used by default, in case of one connection died.
      • http2MaxConcurrentStreamsPerConnection

        @Config("http2.max.concurrent.streams.per.connection")
        @Default("Integer.MAX_VALUE")
        public final int http2MaxConcurrentStreamsPerConnection
        Maximum concurrent number of streams allowed per HTTP/2 connection.
      • http2NettyEventLoopGroupThreads

        @Config("http2.netty.event.loop.group.threads")
        @Default("0")
        public final int http2NettyEventLoopGroupThreads
        Number of threads in a Netty event loop group. 0 means Netty will decide the number.
      • http2MaxContentLength

        @Config("http2.max.content.length")
        @Default("25 * 1024 * 1024")
        public final int http2MaxContentLength
        Maximum content length for a full HTTP/2 content. Used in HttpObjectAggregator. In HttpObjectAggregator, maxContentLength is not used to preallocate buffer, but it throws exception if content length great than maxContentLength TODO: Link this with blob chunk size.
      • http2FrameMaxSize

        @Config("http2.frame.max.size")
        @Default("5 * 1024 * 1024")
        public final int http2FrameMaxSize
        The maximum allowed http2 frame size. This value is used to represent SETTINGS_MAX_FRAME_SIZE.
      • http2InitialWindowSize

        @Config("http2.initial.window.size")
        @Default("5 * 1024 * 1024")
        public final int http2InitialWindowSize
        The initial window size used in http streams. This allows sender send big frame.
      • nettyReceiveBufferSize

        @Config("netty.receive.buffer.size")
        @Default("1024 * 1024")
        public final int nettyReceiveBufferSize
        The socket receive buffer size for netty http2 channel. If -1 is provided, code will not set socket buffer size explicitly. Linux kernel will do TCP buffer auto tune.
      • nettySendBufferSize

        @Config("netty.send.buffer.size")
        @Default("1024 * 1024")
        public final int nettySendBufferSize
        The socket send buffer size for netty http2 channel. If -1 is provided, code will not set socket buffer size explicitly. Linux kernel will do TCP buffer auto tune.
      • http2WriteAndFlushTimeoutMs

        @Config("http2.write.and.flush.timeout.ms")
        @Default("1000")
        public final int http2WriteAndFlushTimeoutMs
        Show warn message if waiting time longer than this threshold.
      • http2DropRequestOnWriteAndFlushTimeout

        @Config("http2.drop.request.on.write.and.flush.timeout")
        @Default("false")
        public final boolean http2DropRequestOnWriteAndFlushTimeout
        Drop request if waiting time longer than http2WriteAndFlushTimeoutMs.
      • http2BlockingChannelAcquireTimeoutMs

        @Config("http2.blocking.channel.acquire.timeout.ms")
        @Default("1000")
        public final int http2BlockingChannelAcquireTimeoutMs
        Maximum time allowed for acquire a stream channel from http2 connection.
      • http2BlockingChannelSendTimeoutMs

        @Config("http2.blocking.channel.send.timeout.ms")
        @Default("5000")
        public final int http2BlockingChannelSendTimeoutMs
        Maximum time allowed for netty write and flush a request.
      • http2BlockingChannelReceiveTimeoutMs

        @Config("http2.blocking.channel.receive.timeout.ms")
        @Default("10000")
        public final int http2BlockingChannelReceiveTimeoutMs
        Maximum waiting time for receiving a response.
      • http2BlockingChannelPoolShutdownTimeoutMs

        @Config("http2.blocking.channel.pool.shutdown.timeout.ms")
        @Default("3000")
        public final int http2BlockingChannelPoolShutdownTimeoutMs
        Maximum waiting time for shutting down Http2BlockingChannelPool and its EventLoopGroup.
    • Constructor Detail