[ https://issues.apache.org/jira/browse/MRESOLVER-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706668#comment-17706668 ]
ASF GitHub Bot commented on MRESOLVER-347: ------------------------------------------ kwin commented on code in PR #274: URL: https://github.com/apache/maven-resolver/pull/274#discussion_r1152684480 ########## maven-resolver-api/src/main/java/org/eclipse/aether/ConfigurationProperties.java: ########## @@ -159,6 +159,37 @@ public final class ConfigurationProperties { */ public static final boolean DEFAULT_HTTP_PREEMPTIVE_AUTH = false; + /** + * Should HTTP client reuse connections (in other words, pool connections) or not? + * + * @see #DEFAULT_HTTP_REUSE_CONNECTIONS + * @since 1.9.8 + */ + public static final String HTTP_REUSE_CONNECTIONS = PREFIX_CONNECTOR + "http.reuseConnections"; + + /** + * The default value to use if {@link #HTTP_REUSE_CONNECTIONS} isn't set (true). + * + * @since 1.9.8 + */ + public static final boolean DEFAULT_HTTP_REUSE_CONNECTIONS = true; + + /** + * The maximum TTL (in milliseconds) HTTP client should apply to connections when reused. + * + * @see #DEFAULT_HTTP_CONNECTION_MAX_TTL + * @see <a href="https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/conn/ConnectionKeepAliveStrategy.html">ConnectionKeepAliveStrategy</a> + * @since 1.9.8 + */ + public static final String HTTP_CONNECTION_MAX_TTL = PREFIX_CONNECTOR + "http.connectionMaxTtl"; + + /** + * The default value to use if {@link #HTTP_CONNECTION_MAX_TTL} isn't set (-1 or "no suggested duration"/forever). + * + * @since 1.9.8 + */ + public static final long DEFAULT_HTTP_CONNECTION_MAX_TTL = -1; Review Comment: If this is the general recommendation why is the default TTL in HttpClient infinite then? > Transport http should be able to not reuse or maximize TTL of connections > ------------------------------------------------------------------------- > > Key: MRESOLVER-347 > URL: https://issues.apache.org/jira/browse/MRESOLVER-347 > Project: Maven Resolver > Issue Type: Improvement > Components: Resolver > Reporter: Tamas Cservenak > Priority: Major > Fix For: 1.9.8 > > > In some environments (like Azure) the connections should not be reused, or > TTL adjusted, as Azure is killing them automagically. -- This message was sent by Atlassian Jira (v8.20.10#820010)