cstamas commented on code in PR #274:
URL: https://github.com/apache/maven-resolver/pull/274#discussion_r1153731983


##########
maven-resolver-api/src/main/java/org/eclipse/aether/ConfigurationProperties.java:
##########
@@ -159,6 +159,51 @@ 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;
+
+    /**
+     * Time to live in seconds for an HTTP connection, after that time, the 
connection will be dropped.
+     *
+     * @see #DEFAULT_HTTP_CONNECTION_MAX_TTL
+     * @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 
(600 seconds).
+     *
+     * @since 1.9.8
+     */
+    public static final int DEFAULT_HTTP_CONNECTION_MAX_TTL = 600;

Review Comment:
   Have to disagree with you Slawek:
   * Wagon 300 sec is totally arbitrary, because:
   * Azure kills after 4 minutes, 300 sec is 5 minutes, so even with Wagon, 
config is needed
   * Even `-1` worked as charm for majority of users in Maven 3.9.1, but here I 
just took highest proposed value @ok2c proposed.
   * It all boils down to: "how many Maven users are out there" vs "how many 
user runs Maven in Azure". If tomorrow a new provider appears that kills 
connections after 1 minute, will we lower the default to 60sec?
   
   IMO, this PR is good as it is, provides sane defaults that works for 
majority of our users, and more importantly, provides means to tune it, if 
needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to