com.netflix.eureka
Interface EurekaServerConfig

All Known Implementing Classes:
DefaultEurekaServerConfig

public interface EurekaServerConfig

Configuration information required by the eureka server to operate.

Most of the required information is provided by the default configuration DefaultServerConfig. Note that all configurations are not effective at runtime unless and otherwise specified.


Method Summary
 int getASGQueryTimeoutMs()
          Get the timeout value for querying the AWS for ASG information.
 long getASGUpdateIntervalMs()
          Get the time interval with which the ASG information must be queried from AWS
 java.lang.String getAWSAccessId()
          Gets the AWS Access Id.
 java.lang.String getAWSSecretKey()
          Gets the AWS Secret Key.
 long getDeltaRetentionTimerIntervalInMs()
          Get the time interval with which the clean up task should wake up and check for expired delta information.
 int getEIPBindingRetryIntervalMs()
          Gets the interval with which the server should check if the EIP is bound and should try to bind in the case if it is already not bound.
 int getEIPBindRebindRetries()
          Gets the number of times the server should try to bind to the candidate EIP.
 long getEvictionIntervalTimerInMs()
          Get the time interval with which the task that expires instances should wake up and run.
 int getMaxElementsInPeerReplicationPool()
          Get the maximum number of replication events that can be allowed to back up in the replication pool.
 int getMaxElementsInStatusReplicationPool()
          Get the maximum number of replication events that can be allowed to back up in the status replication pool.
 long getMaxIdleThreadAgeInMinutesForPeerReplication()
          Get the idle time for which the replication threads can stay alive.
 long getMaxIdleThreadInMinutesAgeForStatusReplication()
          Get the idle time for which the status replication threads can stay alive.
 int getMaxThreadsForPeerReplication()
          Get the maximum number of threads to be used for replication.
 int getMaxThreadsForStatusReplication()
          Get the maximum number of threads to be used for status replication.
 int getMaxTimeForReplication()
          Get the time in milliseconds to try to replicate before dropping replication events.
 int getMinThreadsForPeerReplication()
          Get the minimum number of threads to be used for replication.
 int getMinThreadsForStatusReplication()
          Get the minimum number of threads to be used for status replication.
 int getNumberOfReplicationRetries()
          Get the number of times the replication events should be retried with peers.
 int getPeerEurekaNodesUpdateIntervalMs()
          The interval with which the information about the changes in peer eureka nodes is updated.
 int getPeerEurekaStatusRefreshTimeIntervalMs()
          Gets the interval with which the status information about peer nodes is updated.
 int getPeerNodeConnectionIdleTimeoutSeconds()
          Gets the idle time after which the HTTP connection should be cleaned up.
 int getPeerNodeConnectTimeoutMs()
          Gets the timeout value for connecting to peer eureka nodes for replication.
 int getPeerNodeReadTimeoutMs()
          Gets the timeout value for reading information from peer eureka nodes for replication.
 int getPeerNodeTotalConnections()
          Gets the total number of HTTP connections allowed to peer eureka nodes for replication.
 int getPeerNodeTotalConnectionsPerHost()
          Gets the total number of HTTP connections allowed to a particular peer eureka node for replication.
 int getRegistrySyncRetries()
          Get the number of times that a eureka node would try to get the registry information from the peers during startup.
 int getRemoteRegionConnectionIdleTimeoutSeconds()
          Gets the idle time after which the HTTP connection should be cleaned up for remote regions.
 int getRemoteRegionConnectTimeoutMs()
          Gets the timeout value for connecting to peer eureka nodes for remote regions.
 int getRemoteRegionReadTimeoutMs()
          Gets the timeout value for reading information from peer eureka nodes for remote regions.
 int getRemoteRegionRegistryFetchInterval()
          Get the time interval for which the registryinformation need to be fetched from the remote region.
 int getRemoteRegionTotalConnections()
          Gets the total number of HTTP connections allowed to peer eureka nodes for remote regions.
 int getRemoteRegionTotalConnectionsPerHost()
          Gets the total number of HTTP connections allowed to a particular peer eureka node for remote regions.
 java.lang.String[] getRemoteRegionUrls()
          Get the list of remote region urls
 double getRenewalPercentThreshold()
          The minimum percentage of renewals that is expected from the clients in the period specified by getRenewalThresholdUpdateIntervalMs().
 int getRenewalThresholdUpdateIntervalMs()
          The interval with which the threshold as specified in getRenewalPercentThreshold() needs to be updated.
 long getResponseCacheAutoExpirationInSeconds()
          Gets the time for which the registry payload should be kept in the cache if it is not invalidated by change events.
 long getResponseCacheUpdateIntervalMs()
          Gets the time interval with which the payload cache of the client should be updated.
 long getRetentionTimeInMSInDeltaQueue()
          Get the time for which the delta information should be cached for the clients to retrieve the value without missing it.
 int getWaitTimeInMsWhenSyncEmpty()
          Gets the time to wait when the eureka server starts up unable to get instances from peer nodes.
 boolean shouldDisableDelta()
          Checks to see if the delta information can be served to client or not.
 boolean shouldDisableDeltaForRemoteRegions()
          Checks to see if the delta information can be served to client or not for remote regions.
 boolean shouldEnableSelfPreservation()
          Checks to see if the eureka server is enabled for self preservation.
 boolean shouldGZipContentFromRemoteRegion()
          Indicates whether the content fetched from eureka server has to be compressed for remote regions whenever it is supported by the server.
 boolean shouldPrimeAwsReplicaConnections()
          Checks whether the connections to replicas should be primed.
 boolean shouldSyncWhenTimestampDiffers()
          Checks whether to synchronize instances when timestamp differs.
 

Method Detail

getAWSAccessId

java.lang.String getAWSAccessId()
Gets the AWS Access Id. This is primarily used for Elastic IP Biding. The access id should be provided with appropriate AWS permissions to bind the EIP.

Returns:

getAWSSecretKey

java.lang.String getAWSSecretKey()
Gets the AWS Secret Key. This is primarily used for Elastic IP Biding. The access id should be provided with appropriate AWS permissions to bind the EIP.

Returns:

getEIPBindRebindRetries

int getEIPBindRebindRetries()
Gets the number of times the server should try to bind to the candidate EIP.

The changes are effective at runtime.

Returns:
the number of times the server should try to bind to the candidate EIP.

getEIPBindingRetryIntervalMs

int getEIPBindingRetryIntervalMs()
Gets the interval with which the server should check if the EIP is bound and should try to bind in the case if it is already not bound.

The changes are effective at runtime.

Returns:
the time in milliseconds.

shouldEnableSelfPreservation

boolean shouldEnableSelfPreservation()
Checks to see if the eureka server is enabled for self preservation.

When enabled, the server keeps track of the number of renewals it should receive from the server. Any time, the number of renewals drops below the threshold percentage as defined by getRenewalPercentThreshold(), the server turns off expirations to avert danger.This will help the server in maintaining the registry information in case of network problems between client and the server.

The changes are effective at runtime.

Returns:
true to enable self preservation, false otherwise.

getRenewalPercentThreshold

double getRenewalPercentThreshold()
The minimum percentage of renewals that is expected from the clients in the period specified by getRenewalThresholdUpdateIntervalMs(). If the renewals drop below the threshold, the expirations are disabled if the shouldEnableSelfPreservation() is enabled.

The changes are effective at runtime.

Returns:
value between 0 and 1 indicating the percentage. For example, 85% will be specified as 0.85.

getRenewalThresholdUpdateIntervalMs

int getRenewalThresholdUpdateIntervalMs()
The interval with which the threshold as specified in getRenewalPercentThreshold() needs to be updated.

Returns:
time in milliseconds indicating the interval.

getPeerEurekaNodesUpdateIntervalMs

int getPeerEurekaNodesUpdateIntervalMs()
The interval with which the information about the changes in peer eureka nodes is updated. The user can use the DNS mechanism or dynamic configuration provided by https://github.com/Netflix/archaius to change the information dynamically.

The changes are effective at runtime.

Returns:
timer in milliseconds indicating the interval.

getNumberOfReplicationRetries

int getNumberOfReplicationRetries()
Get the number of times the replication events should be retried with peers.

The changes are effective at runtime.

Returns:
the number of retries.

getPeerEurekaStatusRefreshTimeIntervalMs

int getPeerEurekaStatusRefreshTimeIntervalMs()
Gets the interval with which the status information about peer nodes is updated.

The changes are effective at runtime.

Returns:
time in milliseconds indicating the interval.

getWaitTimeInMsWhenSyncEmpty

int getWaitTimeInMsWhenSyncEmpty()
Gets the time to wait when the eureka server starts up unable to get instances from peer nodes. It is better not to start serving rightaway during these scenarios as the information that is stored in the registry may not be complete. When the instance registry starts up empty, it builds over time when the clients start to send heartbeats and the server requests the clients for registration information.

Returns:
time in milliseconds.

getPeerNodeConnectTimeoutMs

int getPeerNodeConnectTimeoutMs()
Gets the timeout value for connecting to peer eureka nodes for replication.

Returns:
timeout value in milliseconds.

getPeerNodeReadTimeoutMs

int getPeerNodeReadTimeoutMs()
Gets the timeout value for reading information from peer eureka nodes for replication.

Returns:
timeout value in milliseconds.

getPeerNodeTotalConnections

int getPeerNodeTotalConnections()
Gets the total number of HTTP connections allowed to peer eureka nodes for replication.

Returns:
total number of allowed HTTP connections.

getPeerNodeTotalConnectionsPerHost

int getPeerNodeTotalConnectionsPerHost()
Gets the total number of HTTP connections allowed to a particular peer eureka node for replication.

Returns:
total number of allowed HTTP connections for a peer node.

getPeerNodeConnectionIdleTimeoutSeconds

int getPeerNodeConnectionIdleTimeoutSeconds()
Gets the idle time after which the HTTP connection should be cleaned up.

Returns:
idle time in seconds.

getRetentionTimeInMSInDeltaQueue

long getRetentionTimeInMSInDeltaQueue()
Get the time for which the delta information should be cached for the clients to retrieve the value without missing it.

Returns:
time in milliseconds

getDeltaRetentionTimerIntervalInMs

long getDeltaRetentionTimerIntervalInMs()
Get the time interval with which the clean up task should wake up and check for expired delta information.

Returns:
time in milliseconds.

getEvictionIntervalTimerInMs

long getEvictionIntervalTimerInMs()
Get the time interval with which the task that expires instances should wake up and run.

Returns:
time in milliseconds.

getASGQueryTimeoutMs

int getASGQueryTimeoutMs()
Get the timeout value for querying the AWS for ASG information.

Returns:
timeout value in milliseconds.

getASGUpdateIntervalMs

long getASGUpdateIntervalMs()
Get the time interval with which the ASG information must be queried from AWS

Returns:
time in milliseconds.

getResponseCacheAutoExpirationInSeconds

long getResponseCacheAutoExpirationInSeconds()
Gets the time for which the registry payload should be kept in the cache if it is not invalidated by change events.

Returns:
time in seconds.

getResponseCacheUpdateIntervalMs

long getResponseCacheUpdateIntervalMs()
Gets the time interval with which the payload cache of the client should be updated.

Returns:
time in milliseconds.

shouldDisableDelta

boolean shouldDisableDelta()
Checks to see if the delta information can be served to client or not.

The changes are effective at runtime.

Returns:
true if the delta information is allowed to be served, false otherwise.

getMaxIdleThreadInMinutesAgeForStatusReplication

long getMaxIdleThreadInMinutesAgeForStatusReplication()
Get the idle time for which the status replication threads can stay alive.

Returns:
time in minutes.

getMinThreadsForStatusReplication

int getMinThreadsForStatusReplication()
Get the minimum number of threads to be used for status replication.

Returns:
minimum number of threads to be used for status replication.

getMaxThreadsForStatusReplication

int getMaxThreadsForStatusReplication()
Get the maximum number of threads to be used for status replication.

Returns:
maximum number of threads to be used for status replication.

getMaxElementsInStatusReplicationPool

int getMaxElementsInStatusReplicationPool()
Get the maximum number of replication events that can be allowed to back up in the status replication pool.

Depending on the memory allowed, timeout and the replication traffic, this value can vary.

Returns:
the maximum number of replication events that can be allowed to back up.

shouldSyncWhenTimestampDiffers

boolean shouldSyncWhenTimestampDiffers()
Checks whether to synchronize instances when timestamp differs.

The changes are effective at runtime.

Returns:
true, to synchronize, false otherwise.

getRegistrySyncRetries

int getRegistrySyncRetries()
Get the number of times that a eureka node would try to get the registry information from the peers during startup.

Returns:
the number of retries

getMaxElementsInPeerReplicationPool

int getMaxElementsInPeerReplicationPool()
Get the maximum number of replication events that can be allowed to back up in the replication pool. This replication pool is responsible for all events except status updates.

Depending on the memory allowed, timeout and the replication traffic, this value can vary.

Returns:
the maximum number of replication events that can be allowed to back up.

getMaxIdleThreadAgeInMinutesForPeerReplication

long getMaxIdleThreadAgeInMinutesForPeerReplication()
Get the idle time for which the replication threads can stay alive.

Returns:
time in minutes.

getMinThreadsForPeerReplication

int getMinThreadsForPeerReplication()
Get the minimum number of threads to be used for replication.

Returns:
minimum number of threads to be used for replication.

getMaxThreadsForPeerReplication

int getMaxThreadsForPeerReplication()
Get the maximum number of threads to be used for replication.

Returns:
maximum number of threads to be used for replication.

getMaxTimeForReplication

int getMaxTimeForReplication()
Get the time in milliseconds to try to replicate before dropping replication events.

Returns:
time in milliseconds

shouldPrimeAwsReplicaConnections

boolean shouldPrimeAwsReplicaConnections()
Checks whether the connections to replicas should be primed. In AWS, the firewall requires sometime to establish network connection for new nodes.

Returns:
true, if connections should be primed, false otherwise.

shouldDisableDeltaForRemoteRegions

boolean shouldDisableDeltaForRemoteRegions()
Checks to see if the delta information can be served to client or not for remote regions.

The changes are effective at runtime.

Returns:
true if the delta information is allowed to be served, false otherwise.

getRemoteRegionConnectTimeoutMs

int getRemoteRegionConnectTimeoutMs()
Gets the timeout value for connecting to peer eureka nodes for remote regions.

Returns:
timeout value in milliseconds.

getRemoteRegionReadTimeoutMs

int getRemoteRegionReadTimeoutMs()
Gets the timeout value for reading information from peer eureka nodes for remote regions.

Returns:
timeout value in milliseconds.

getRemoteRegionTotalConnections

int getRemoteRegionTotalConnections()
Gets the total number of HTTP connections allowed to peer eureka nodes for remote regions.

Returns:
total number of allowed HTTP connections.

getRemoteRegionTotalConnectionsPerHost

int getRemoteRegionTotalConnectionsPerHost()
Gets the total number of HTTP connections allowed to a particular peer eureka node for remote regions.

Returns:
total number of allowed HTTP connections for a peer node.

getRemoteRegionConnectionIdleTimeoutSeconds

int getRemoteRegionConnectionIdleTimeoutSeconds()
Gets the idle time after which the HTTP connection should be cleaned up for remote regions.

Returns:
idle time in seconds.

shouldGZipContentFromRemoteRegion

boolean shouldGZipContentFromRemoteRegion()
Indicates whether the content fetched from eureka server has to be compressed for remote regions whenever it is supported by the server. The registry information from the eureka server is compressed for optimum network traffic.

Returns:
true, if the content need to be compressed, false otherwise.

getRemoteRegionUrls

java.lang.String[] getRemoteRegionUrls()
Get the list of remote region urls

Returns:
- array of string representing URLs.

getRemoteRegionRegistryFetchInterval

int getRemoteRegionRegistryFetchInterval()
Get the time interval for which the registryinformation need to be fetched from the remote region.

Returns:
time in seconds.