Reactor-Netty 常用的配置信息

Spring Gateway 网关使用的是 reactor-netty 来做和后端服务的通讯.

主要使用了 reactor.netty.http.client.HttpClientTcpConfig 来充当一个 http client

reactor.netty.resources.ConnectionProvider 定义了一些链接的配置信息

    int DEFAULT_POOL_MAX_CONNECTIONS = Integer.parseInt(System.getProperty("reactor.netty.pool.maxConnections", "" + Math.max(Runtime.getRuntime().availableProcessors(), 8) * 2));
    long DEFAULT_POOL_ACQUIRE_TIMEOUT = Long.parseLong(System.getProperty("reactor.netty.pool.acquireTimeout", "45000"));
    long DEFAULT_POOL_MAX_IDLE_TIME = Long.parseLong(System.getProperty("reactor.netty.pool.maxIdleTime", "-1"));
    String LEASING_STRATEGY_FIFO = "fifo";
    String LEASING_STRATEGY_LIFO = "lifo";
    String DEFAULT_POOL_LEASING_STRATEGY = System.getProperty("reactor.netty.pool.leasingStrategy", "fifo").toLowerCase(Locale.ENGLISH);

此处会把链接池话,但是需要服务端进行 http keeplive.