diff --git a/docs/modules/ROOT/partials/_configprops.adoc b/docs/modules/ROOT/partials/_configprops.adoc index a027a5194..9ec41d4f9 100644 --- a/docs/modules/ROOT/partials/_configprops.adoc +++ b/docs/modules/ROOT/partials/_configprops.adoc @@ -21,7 +21,7 @@ |eureka.client.eureka-server-total-connections | `+++200+++` | Gets the total number of connections that is allowed from eureka client to all eureka servers. |eureka.client.eureka-server-total-connections-per-host | `+++50+++` | Gets the total number of connections that is allowed from eureka client to a eureka server host. |eureka.client.eureka-server-u-r-l-context | | Gets the URL context to be used to construct the service url to contact eureka server when the list of eureka servers come from the DNS. This information is not required if the contract returns the service urls from eurekaServerServiceUrls. The DNS mechanism is used when useDnsForFetchingServiceUrls is set to true and the eureka client expects the DNS to configured a certain way so that it can fetch changing eureka servers dynamically. The changes are effective at runtime. -|eureka.client.eureka-service-url-poll-interval-seconds | `+++0+++` | Indicates how often(in seconds) to poll for changes to eureka server information. Eureka servers could be added or removed and this setting controls how soon the eureka clients should know about it. +|eureka.client.eureka-service-url-poll-interval-seconds | `+++300+++` | Indicates how often(in seconds) to poll for changes to eureka server information. Eureka servers could be added or removed and this setting controls how soon the eureka clients should know about it. |eureka.client.fetch-registry | `+++true+++` | Indicates whether this client should fetch eureka registry information from eureka server. |eureka.client.fetch-remote-regions-registry | | Comma separated list of regions for which the eureka registry information will be fetched. It is mandatory to define the availability zones for each of these regions as returned by availabilityZones. Failing to do so, will result in failure of discovery client startup. |eureka.client.filter-only-up-instances | `+++true+++` | Indicates whether to get the applications after filtering the applications for instances with only InstanceStatus UP states. @@ -45,9 +45,9 @@ |eureka.client.register-with-eureka | `+++true+++` | Indicates whether or not this instance should register its information with eureka server for discovery by others. In some cases, you do not want your instances to be discovered whereas you just want do discover other instances. |eureka.client.registry-fetch-interval-seconds | `+++30+++` | Indicates how often(in seconds) to fetch the registry information from the eureka server. |eureka.client.registry-refresh-single-vip-address | | Indicates whether the client is only interested in the registry information for a single VIP. -|eureka.client.rest-template-timeout.connect-request-timeout | `+++0+++` | -|eureka.client.rest-template-timeout.connect-timeout | `+++0+++` | Default values are set to 180000, in keeping with {@link RequestConfig} and {@link SocketConfig} defaults. -|eureka.client.rest-template-timeout.socket-timeout | `+++0+++` | +|eureka.client.rest-template-timeout.connect-request-timeout | `+++180000+++` | +|eureka.client.rest-template-timeout.connect-timeout | `+++180000+++` | Default values are set to 180000, in keeping with {@link RequestConfig} and {@link SocketConfig} defaults. +|eureka.client.rest-template-timeout.socket-timeout | `+++180000+++` | |eureka.client.service-url | | Map of availability zone to list of fully qualified URLs to communicate with eureka server. Each value can be a single URL or a comma separated list of alternative locations. Typically the eureka server URLs carry protocol,host,port,context and version information if any. Example: https://ec2-256-156-243-129.compute-1.amazonaws.com:7001/eureka/ The changes are effective at runtime at the next service url refresh cycle as specified by eurekaServiceUrlPollIntervalSeconds. |eureka.client.should-enforce-registration-at-init | `+++false+++` | Indicates whether the client should enforce registration during initialization. Defaults to false. |eureka.client.should-unregister-on-shutdown | `+++true+++` | Indicates whether the client should explicitly unregister itself from the remote server on client shutdown. @@ -98,20 +98,20 @@ |eureka.instance.status-page-url | | Gets the absolute status page URL path for this instance. The users can provide the statusPageUrlPath if the status page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence. It is normally used for informational purposes for other services to find about the status of this instance. Users can provide a simple HTML indicating what is the current status of the instance. |eureka.instance.status-page-url-path | | Gets the relative status page URL path for this instance. The status page URL is then constructed out of the hostName and the type of communication - secure or unsecure as specified in securePort and nonSecurePort. It is normally used for informational purposes for other services to find about the status of this instance. Users can provide a simple HTML indicating what is the current status of the instance. |eureka.instance.virtual-host-name | `+++unknown+++` | Gets the virtual host name defined for this instance. This is typically the way other instance would find this instance by using the virtual host name.Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance. -|eureka.server.a-s-g-cache-expiry-timeout-ms | `+++0+++` | +|eureka.server.a-s-g-cache-expiry-timeout-ms | `+++600000+++` | |eureka.server.a-s-g-query-timeout-ms | `+++300+++` | -|eureka.server.a-s-g-update-interval-ms | `+++0+++` | +|eureka.server.a-s-g-update-interval-ms | `+++300000+++` | |eureka.server.a-w-s-access-id | | |eureka.server.a-w-s-secret-key | | |eureka.server.batch-replication | `+++false+++` | |eureka.server.binding-strategy | `+++eip+++` | -|eureka.server.delta-retention-timer-interval-in-ms | `+++0+++` | +|eureka.server.delta-retention-timer-interval-in-ms | `+++30000+++` | |eureka.server.disable-delta | `+++false+++` | |eureka.server.disable-delta-for-remote-regions | `+++false+++` | |eureka.server.disable-transparent-fallback-to-other-region | `+++false+++` | |eureka.server.e-i-p-bind-rebind-retries | `+++3+++` | -|eureka.server.e-i-p-binding-retry-interval-ms | `+++0+++` | -|eureka.server.e-i-p-binding-retry-interval-ms-when-unbound | `+++0+++` | +|eureka.server.e-i-p-binding-retry-interval-ms | `+++300000+++` | +|eureka.server.e-i-p-binding-retry-interval-ms-when-unbound | `+++60000+++` | |eureka.server.enable-replicated-request-compression | `+++false+++` | |eureka.server.enable-self-preservation | `+++true+++` | |eureka.server.eviction-interval-timer-in-ms | `+++0+++` | @@ -134,7 +134,7 @@ |eureka.server.min-threads-for-status-replication | `+++1+++` | |eureka.server.my-url | | |eureka.server.number-of-replication-retries | `+++5+++` | -|eureka.server.peer-eureka-nodes-update-interval-ms | `+++0+++` | +|eureka.server.peer-eureka-nodes-update-interval-ms | `+++600000+++` | |eureka.server.peer-eureka-status-refresh-time-interval-ms | `+++0+++` | |eureka.server.peer-node-connect-timeout-ms | `+++200+++` | |eureka.server.peer-node-connection-idle-timeout-seconds | `+++30+++` | @@ -164,16 +164,16 @@ |eureka.server.remote-region-urls | | |eureka.server.remote-region-urls-with-name | | |eureka.server.renewal-percent-threshold | `+++0.85+++` | -|eureka.server.renewal-threshold-update-interval-ms | `+++0+++` | +|eureka.server.renewal-threshold-update-interval-ms | `+++900000+++` | |eureka.server.response-cache-auto-expiration-in-seconds | `+++180+++` | -|eureka.server.response-cache-update-interval-ms | `+++0+++` | -|eureka.server.retention-time-in-m-s-in-delta-queue | `+++0+++` | +|eureka.server.response-cache-update-interval-ms | `+++30000+++` | +|eureka.server.retention-time-in-m-s-in-delta-queue | `+++180000+++` | |eureka.server.route53-bind-rebind-retries | `+++3+++` | -|eureka.server.route53-binding-retry-interval-ms | `+++0+++` | +|eureka.server.route53-binding-retry-interval-ms | `+++300000+++` | |eureka.server.route53-domain-t-t-l | `+++30+++` | |eureka.server.sync-when-timestamp-differs | `+++true+++` | |eureka.server.use-read-only-response-cache | `+++true+++` | -|eureka.server.wait-time-in-ms-when-sync-empty | `+++0+++` | +|eureka.server.wait-time-in-ms-when-sync-empty | `+++300000+++` | |eureka.server.xml-codec-name | | |spring.cloud.compatibility-verifier.compatible-boot-versions | `+++3.4.x+++` | Default accepted versions for the Spring Boot dependency. You can set {@code x} for the patch version if you don't want to specify a concrete value. Example: {@code 3.4.x} |spring.cloud.compatibility-verifier.enabled | `+++false+++` | Enables creation of Spring Cloud compatibility verification. diff --git a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java index 7c4eda303..2b1ef29d1 100644 --- a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java +++ b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaClientConfigBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2022 the original author or authors. + * Copyright 2013-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ * * @author Dave Syer * @author Gregor Zurowski + * @author Mooyong Lee */ @ConfigurationProperties(EurekaClientConfigBean.PREFIX) public class EurekaClientConfigBean implements EurekaClientConfig, Ordered { @@ -60,8 +61,6 @@ public class EurekaClientConfigBean implements EurekaClientConfig, Ordered { */ public static final String DEFAULT_ZONE = "defaultZone"; - private static final int MINUTES = 60; - @Autowired(required = false) PropertyResolver propertyResolver; @@ -96,7 +95,7 @@ public class EurekaClientConfigBean implements EurekaClientConfig, Ordered { * Eureka servers could be added or removed and this setting controls how soon the * eureka clients should know about it. */ - private int eurekaServiceUrlPollIntervalSeconds = 5 * MINUTES; + private int eurekaServiceUrlPollIntervalSeconds = 300; // 5 * MINUTES /** * Gets the proxy port to eureka server if any. diff --git a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/RestTemplateTimeoutProperties.java b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/RestTemplateTimeoutProperties.java index 394420ddb..15bddb3ba 100644 --- a/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/RestTemplateTimeoutProperties.java +++ b/spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/RestTemplateTimeoutProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2022 the original author or authors. + * Copyright 2013-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ * {@link RestTemplateEurekaHttpClient}. * * @author Jiwon Jeon + * @author Mooyong Lee * @since 3.1.6 */ @ConfigurationProperties("eureka.client.rest-template-timeout") @@ -39,11 +40,11 @@ public class RestTemplateTimeoutProperties { * Default values are set to 180000, in keeping with {@link RequestConfig} and * {@link SocketConfig} defaults. */ - private int connectTimeout = 3 * 60 * 1000; + private int connectTimeout = 180000; // 3 * MINUTES - private int connectRequestTimeout = 3 * 60 * 1000; + private int connectRequestTimeout = 180000; // 3 * MINUTES - private int socketTimeout = 3 * 60 * 1000; + private int socketTimeout = 180000; // 3 * MINUTES public int getConnectTimeout() { return connectTimeout; diff --git a/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java b/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java index 4bfbaae86..fc91787f0 100644 --- a/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java +++ b/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2022 the original author or authors. + * Copyright 2013-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ /** * @author Dave Syer * @author Gregor Zurowski + * @author Mooyong Lee */ @ConfigurationProperties(EurekaServerConfigBean.PREFIX) public class EurekaServerConfigBean implements EurekaServerConfig { @@ -43,8 +44,6 @@ public class EurekaServerConfigBean implements EurekaServerConfig { */ public static final String PREFIX = "eureka.server"; - private static final int MINUTES = 60 * 1000; - @Autowired(required = false) PropertyResolver propertyResolver; @@ -54,23 +53,23 @@ public class EurekaServerConfigBean implements EurekaServerConfig { private int eIPBindRebindRetries = 3; - private int eIPBindingRetryIntervalMs = 5 * MINUTES; + private int eIPBindingRetryIntervalMs = 300000; // 5 * MINUTES - private int eIPBindingRetryIntervalMsWhenUnbound = 1 * MINUTES; + private int eIPBindingRetryIntervalMsWhenUnbound = 60000; // 1 * MINUTES private boolean enableSelfPreservation = true; private double renewalPercentThreshold = 0.85; - private int renewalThresholdUpdateIntervalMs = 15 * MINUTES; + private int renewalThresholdUpdateIntervalMs = 900000; // 15 * MINUTES - private int peerEurekaNodesUpdateIntervalMs = 10 * MINUTES; + private int peerEurekaNodesUpdateIntervalMs = 600000; // 10 * MINUTES private int numberOfReplicationRetries = 5; private int peerEurekaStatusRefreshTimeIntervalMs = 30 * 1000; - private int waitTimeInMsWhenSyncEmpty = 5 * MINUTES; + private int waitTimeInMsWhenSyncEmpty = 300000; // 5 * MINUTES private int peerNodeConnectTimeoutMs = 200; @@ -82,23 +81,24 @@ public class EurekaServerConfigBean implements EurekaServerConfig { private int peerNodeConnectionIdleTimeoutSeconds = 30; - private long retentionTimeInMSInDeltaQueue = 3 * MINUTES; + private long retentionTimeInMSInDeltaQueue = 180000; // 3 * MINUTES - private long deltaRetentionTimerIntervalInMs = 30 * 1000; + private long deltaRetentionTimerIntervalInMs = 30000; // 30 * SECONDS private long evictionIntervalTimerInMs = 60 * 1000; private int aSGQueryTimeoutMs = 300; - private long aSGUpdateIntervalMs = 5 * MINUTES; + private long aSGUpdateIntervalMs = 300000; // 5 * MINUTES - private long aSGCacheExpiryTimeoutMs = 10 * MINUTES; // defaults to longer than the + private long aSGCacheExpiryTimeoutMs = 600000; // 10 * MINUTES // defaults to longer + // than the // asg update interval private long responseCacheAutoExpirationInSeconds = 180; - private long responseCacheUpdateIntervalMs = 30 * 1000; + private long responseCacheUpdateIntervalMs = 30000; // 30 * SECONDS private boolean useReadOnlyResponseCache = true; @@ -186,7 +186,7 @@ public class EurekaServerConfigBean implements EurekaServerConfig { private int route53BindRebindRetries = 3; - private int route53BindingRetryIntervalMs = 5 * MINUTES; + private int route53BindingRetryIntervalMs = 300000; // 5 * MINUTES private long route53DomainTTL = 30;