Skip to content

Commit

Permalink
[fast-client][router] Revert "[fast-client][router] Fixed one slow st…
Browse files Browse the repository at this point in the history
…art issue (#1125)" (#1167)

Revert "[fast-client][router] Fixed one slow start issue (#1125)"

This reverts commit c9304b2.
  • Loading branch information
huangminchn authored Sep 11, 2024
1 parent 74e5e82 commit 233d3fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@
import static com.linkedin.venice.ConfigKeys.UNREGISTER_METRIC_FOR_DELETED_STORE_ENABLED;
import static com.linkedin.venice.ConfigKeys.UNSORTED_INPUT_DRAINER_SIZE;
import static com.linkedin.venice.ConfigKeys.USE_DA_VINCI_SPECIFIC_EXECUTION_STATUS_FOR_ERROR;
import static com.linkedin.venice.httpclient5.HttpClient5Utils.H2_HEADER_TABLE_SIZE;
import static com.linkedin.venice.httpclient5.HttpClient5Utils.H2_INITIAL_WINDOW_SIZE;
import static com.linkedin.venice.httpclient5.HttpClient5Utils.H2_MAX_CONCURRENT_STREAMS;
import static com.linkedin.venice.httpclient5.HttpClient5Utils.H2_MAX_FRAME_SIZE;
import static com.linkedin.venice.httpclient5.HttpClient5Utils.H2_MAX_HEADER_LIST_SIZE;
import static com.linkedin.venice.pubsub.PubSubConstants.PUBSUB_TOPIC_MANAGER_METADATA_FETCHER_CONSUMER_POOL_SIZE_DEFAULT_VALUE;
import static com.linkedin.venice.utils.ByteUtils.BYTES_PER_MB;
import static com.linkedin.venice.utils.ByteUtils.generateHumanReadableByteCountString;
Expand Down Expand Up @@ -754,11 +749,11 @@ public VeniceServerConfig(VeniceProperties serverProperties, Map<String, Map<Str
unsubscribeAfterBatchpushEnabled = serverProperties.getBoolean(SERVER_UNSUB_AFTER_BATCHPUSH, false);

http2InboundEnabled = serverProperties.getBoolean(SERVER_HTTP2_INBOUND_ENABLED, false);
http2MaxConcurrentStreams = serverProperties.getInt(SERVER_HTTP2_MAX_CONCURRENT_STREAMS, H2_MAX_CONCURRENT_STREAMS);
http2MaxFrameSize = serverProperties.getInt(SERVER_HTTP2_MAX_FRAME_SIZE, H2_MAX_FRAME_SIZE);
http2InitialWindowSize = serverProperties.getInt(SERVER_HTTP2_INITIAL_WINDOW_SIZE, H2_INITIAL_WINDOW_SIZE);
http2HeaderTableSize = serverProperties.getInt(SERVER_HTTP2_HEADER_TABLE_SIZE, H2_HEADER_TABLE_SIZE);
http2MaxHeaderListSize = serverProperties.getInt(SERVER_HTTP2_MAX_HEADER_LIST_SIZE, H2_MAX_HEADER_LIST_SIZE);
http2MaxConcurrentStreams = serverProperties.getInt(SERVER_HTTP2_MAX_CONCURRENT_STREAMS, 100);
http2MaxFrameSize = serverProperties.getInt(SERVER_HTTP2_MAX_FRAME_SIZE, 8 * 1024 * 1024);
http2InitialWindowSize = serverProperties.getInt(SERVER_HTTP2_INITIAL_WINDOW_SIZE, 8 * 1024 * 1024);
http2HeaderTableSize = serverProperties.getInt(SERVER_HTTP2_HEADER_TABLE_SIZE, 4096);
http2MaxHeaderListSize = serverProperties.getInt(SERVER_HTTP2_MAX_HEADER_LIST_SIZE, 8192);

offsetLagDeltaRelaxFactorForFastOnlineTransitionInRestart =
serverProperties.getInt(OFFSET_LAG_DELTA_RELAX_FACTOR_FOR_FAST_ONLINE_TRANSITION_IN_RESTART, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
import org.apache.hc.core5.http.ssl.TLS;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.http2.config.H2Config;
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.util.Timeout;

Expand All @@ -34,12 +33,6 @@
* TODO: follow up with the httpclient team to get a proper fix.
*/
public class HttpClient5Utils {
public static final int H2_HEADER_TABLE_SIZE = 4096;
public static final int H2_MAX_HEADER_LIST_SIZE = 8092;
public static final int H2_MAX_FRAME_SIZE = 8 * 1024 * 1024;
public static final int H2_INITIAL_WINDOW_SIZE = 8 * 1024 * 1024;
public static final int H2_MAX_CONCURRENT_STREAMS = 100;

public static class HttpClient5Builder {
private SSLContext sslContext;
private long requestTimeOutInMilliseconds = TimeUnit.SECONDS.toMillis(1); // 1s by default
Expand Down Expand Up @@ -157,20 +150,6 @@ public CloseableHttpAsyncClient build() {
.setIOReactorConfig(ioReactorConfig)
.setDefaultConnectionConfig(getDefaultConnectionConfig())
.setDefaultRequestConfig(getDefaultRequestConfig())
.setH2Config(
/**
* The following settings are important to avoid the slow start issue
* as if we use a small Frame/initial window setting, it will take
* time to ramp them up, which would result in a slow start issue
* for medium/large responses.
*/
H2Config.initial()
.setHeaderTableSize(H2_HEADER_TABLE_SIZE)
.setMaxFrameSize(H2_MAX_FRAME_SIZE)
.setInitialWindowSize(H2_INITIAL_WINDOW_SIZE)
.setMaxHeaderListSize(H2_MAX_HEADER_LIST_SIZE)
.setMaxConcurrentStreams(H2_MAX_CONCURRENT_STREAMS)
.build())
.build();
}
}
Expand Down

0 comments on commit 233d3fd

Please sign in to comment.