Eureka Server及Client 配置信息详解

2022年10月27日12:13:35

EurekaDashboardProperties(仪表盘配置)

仪表盘即前端管理界面: 配置: eureka.dashboard.名称

名称 默认值 说明
path / 访问仪表盘的路径
enable true 是否开启仪表盘

EurekaClientConfigBean(客户端配置Bean)

  1. 配置前缀 eureka.client.
  2. 详细参考:spring-cloud-netflix-eureka-client.jar下“META-INF/spring-configtion-metadata.json”
名称 默认值 说明
enabled true 客户端是否已启用
EurekaTransportConfig transport new CloudEurekaTransportConfig()
registryFetchIntervalSeconds 30 从Eureka服务端获取注册表间隔时间(秒)
instanceInfoReplicationIntervalSeconds 30 实例信息复制到Eureka服务器间隔时间30(秒)
initialInstanceInfoReplicationIntervalSeconds 40 初始化实例信息复制到Eureka服务器间隔时间(秒)
eurekaServiceUrlPollIntervalSeconds 300 客户端循环Eureka服务器端URL间隔时间
proxyPort 代理端口
proxyHost 代理主机
proxyUserName 代理用户名
proxyPassword 代理密码
eurekaServerReadTimeoutSeconds 8 读取Eureka服务端超时时间(秒)
eurekaServerConnectTimeoutSeconds 5 连接Eureka服务端超时时间(秒)
backupRegistryImpl 回退注册表信息实现,只有当Eureka客户端第一次启动有效
eurekaServerTotalConnections 200 连接Eureka服务器端总连接数
eurekaServerTotalConnectionsPerHost 50 连接Eureka服务器端主机总连接数
eurekaServerURLContext 获取Eureka服务器端URL上下文,当URL列表来自DNS时需要设置。
eurekaServerPort Eureka服务端端口号
eurekaServerDNSName Eureka服务器端DNS名称,当需要开启DNS动态更新Eureka服务端URLS
region “us-east-1” 实例所在区域
eurekaConnectionIdleTimeoutSeconds 30 Eureka连接空闲超时时间(秒),即HTTP在关闭之前可以保持空闲
registryRefreshSingleVipAddress 刷新单个VIP地址注册表
heartbeatExecutorThreadPoolSize 2 心跳执行器线程池大小
heartbeatExecutorExponentialBackOffBound 10 心跳执行器指数回退边界,是重试延迟最大倍值。
cacheRefreshExecutorThreadPoolSize 2 缓存刷新执行器线程池大小
cacheRefreshExecutorExponentialBackOffBound 10 缓存刷新执行器指数回退边界,是重试延迟最大倍值。
serviceUrl HashMap(String,String) 服务器端URLMap
gZipContent true 开启gZip压缩内容
useDnsForFetchingServiceUrls false 使用DNS获取服务端URL列表
registerWithEureka true 注册实例到Eureka服务器端
preferSameZoneEureka true 首选同一区域Eureka服务
logDeltaDiff false 对数增量差异
disableDelta false 开启增量
fetchRemoteRegionsRegistry 获取远程区域注册表
availabilityZones HashMap(String,String) 可用区域
filterOnlyUpInstances true 仅刷选UP实例
fetchRegistry true 获取注册表
dollarReplacement _- 替换美元号,在序列化和反序列化时
escapeCharReplacement __ 转义字符替换,在序列化和反序列化时
allowRedirects false 允许重定向,即是否可重定向到从集群
onDemandUpdateStatusChange true 按需更新状态更改,本地状态更新触发远程注册或更新
encoderName false 编码器名称
decoderName false 解码器名称
clientDataAccept EurekaAccept.full.name 客户端数据接受
shouldUnregisterOnShutdown ture 实例下线时注销在Eureka服务器端的信息
shouldEnforceRegistrationAtInit false 在初始化时是否强制注册
order 0 排序

EurekaServerConfigBean (服务配置Bean)

  1. 配置前缀 eureka.server.
  2. 详细参考:spring-cloud-netflix-eureka-server.jar下“META-INF/spring-configtion-metadata.json”
名称 默认值 说明
aWSAccessId
aWSSecretKey
eIPBindRebindRetries 3 eIP 重试绑定次数
eIPBindingRetryIntervalMs 5 * MINUTES eIP重试绑定间隔时间(毫秒)
eIPBindingRetryIntervalMsWhenUnbound 1 * MINUTES eIP重试绑定时间间隔(毫秒)当未绑定时
enableSelfPreservation true 启用自我保护
renewalPercentThreshold 0.85 续约百分比阀值
renewalThresholdUpdateIntervalMs 15 * MINUTES 更新续约阀值间隔时间(毫秒)
peerEurekaNodesUpdateIntervalMs 10 * MINUTES 对等Eureka节点更新间隔时间
numberOfReplicationRetries 5 复制重试次数
peerEurekaStatusRefreshTimeIntervalMs 30 * 1000 对等Eureka状态刷新时间间隔(毫秒)
waitTimeInMsWhenSyncEmpty 5 * MINUTES 同步为空时的等待时间(毫秒
peerNodeConnectTimeoutMs 200 对等节点连接超时时间(毫秒)
peerNodeReadTimeoutMs 200 对等节点读取超时时间(毫秒)
peerNodeTotalConnections 1000 对等节点总连接数
peerNodeTotalConnectionsPerHost 500 对等节点主机总连接数
peerNodeConnectionIdleTimeoutSeconds 30 对等节点连接空闲超时时间(秒)
retentionTimeInMSInDeltaQueue 3 * MINUTES 增量队列中的保留时间(毫秒)
deltaRetentionTimerIntervalInMs 30 * 1000 增量保留计时器间隔(毫秒)
evictionIntervalTimerInMs 60 * 1000 去除计时器间隔时间(毫秒)
aSGQueryTimeoutMs 300 aSG查询超时时间(毫秒)
aSGUpdateIntervalMs 5 * MINUTES aSG更新间隔时间(毫秒)
aSGCacheExpiryTimeoutMs 10 * MINUTES aSG缓存过期时间(毫秒)
responseCacheAutoExpirationInSeconds 180 响应缓存自动过期时间(秒)
responseCacheUpdateIntervalMs 30 * 1000 响应缓存更新时间时间(毫秒)
useReadOnlyResponseCache true 使用只读响应缓存
disableDelta false 禁用增量
maxIdleThreadInMinutesAgeForStatusReplication 10 状态复制的最大空闲线程数(分钟)
minThreadsForStatusReplication 1 状态复制的最小线程数
maxThreadsForStatusReplication 1 状态复制的最大线程数
maxElementsInStatusReplicationPool 10000 状态复制池中的最大元素数
syncWhenTimestampDiffers true 当时间戳不同时同步
registrySyncRetries 0 注册表同步重试次数
registrySyncRetryWaitMs 30 * 1000 注册表同步重试等待时间(毫秒)
maxElementsInPeerReplicationPool 10000 对等复制池中的最大元素数
maxIdleThreadAgeInMinutesForPeerReplication 15 对等复制的最大空闲线程时间(分钟)
minThreadsForPeerReplication 5 对等复制最小线程数
maxThreadsForPeerReplication 20 对等复制最大线程数
maxTimeForReplication 30000 复制最长时间
primeAwsReplicaConnections true
disableDeltaForRemoteRegions fasle 禁用远程区域增量
remoteRegionConnectTimeoutMs 1000 远程区域连接超时时间(毫秒)
remoteRegionReadTimeoutMs 1000 远程区域读超时时间(毫秒)
remoteRegionTotalConnections 1000 远程区域总连接数
remoteRegionTotalConnectionsPerHost 500 远程区域主机总连接数
remoteRegionConnectionIdleTimeoutSeconds 30 远程区域连接空闲超时时间(秒)
gZipContentFromRemoteRegion true 获取远程区域内容gZip压缩
remoteRegionUrlsWithName Map<String,String> 远程区域URL和名称
remoteRegionUrls String[] 远程区域URLS
remoteRegionAppWhitelist HashMap<String,Set> 远程区域APP白名单
remoteRegionRegistryFetchInterval 30 远程区域注册表获取间隔时间
remoteRegionFetchThreadPoolSize 20 远程区域获取线程池大小
remoteRegionTrustStore “” 远程区域信任存储
remoteRegionTrustStorePassword “changeit” 远程区域信任密码
disableTransparentFallbackToOtherRegion false 禁用透明回退到其他区域
batchReplication 批量复制
rateLimiterEnabled = false 速率限制器是否启用
rateLimiterThrottleStandardClients false 速率限制器节流标准客户端
rateLimiterPrivilegedClients Collections.emptySet()
rateLimiterBurstSize 10 速率限制器并发大小
rateLimiterRegistryFetchAverageRate 500 速率限制注册表获取平均速率
rateLimiterFullFetchAverageRate 100 速率限制全取平均速率
logIdentityHeaders true 日志标识头
listAutoScalingGroupsRoleName “ListAutoScalingGroups” 列表自动缩放组角色名称
enableReplicatedRequestCompression false 启动复制请求压缩
jsonCodecName json编码器名称
xmlCodecName xml编码器名称
route53BindRebindRetries 3
route53BindingRetryIntervalMs 5 * MINUTES
route53DomainTTL 30
bindingStrategy AwsBindingStrategy.EIP
minAvailableInstancesForPeerReplication -1 对等复制的最小可用实例数
initialCapacityOfResponseCache 1000 响应缓存的初始容量
expectedClientRenewalIntervalSeconds 30 预期客户端续订间隔时间(秒)
useAwsAsgApi true 使用AwsAsgApi
myUrl
  • 作者:swg321321
  • 原文链接:https://blog.csdn.net/swg321321/article/details/125944275
    更新时间:2022年10月27日12:13:35 ,共 5485 字。