You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/10/15 11:35:14 UTC

[GitHub] liubao68 commented on a change in pull request #947: [SCB-837] make http2 production ready

liubao68 commented on a change in pull request #947:  [SCB-837] make http2 production ready
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/947#discussion_r225131283
 
 

 ##########
 File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java
 ##########
 @@ -87,6 +85,21 @@ private static HttpClientOptions createHttpClientOptions() {
     return httpClientOptions;
   }
 
+  private static HttpClientOptions createHttp2ClientOptions() {
+    HttpClientOptions httpClientOptions = new HttpClientOptions();
+    httpClientOptions.setMaxPoolSize(TransportClientConfig.getConnectionMaxPoolSize())
+        .setUseAlpn(TransportClientConfig.getUseAlpn())
+        .setHttp2ClearTextUpgrade(false)
+        .setProtocolVersion(HttpVersion.HTTP_2)
+        .setIdleTimeout(TransportClientConfig.getHttp2ConnectionIdleTimeoutInSeconds())
+        .setHttp2MultiplexingLimit(TransportClientConfig.getHttp2MultiplexingLimit())
+        .setHttp2MaxPoolSize(TransportClientConfig.getHttp2ConnectionMaxPoolSize())
 
 Review comment:
   Do we need to setMaxPoolSize  & setHttp2MaxPoolSize both?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services