spring - 为什么在关闭Eureka的情况下使用Zuul + Ribbon时路由会有延迟?
问题描述
当Zuul
路由到微服务时,大约需要 5 毫秒,但在第 30秒,它会增加 100 毫秒 + 延迟。
我补充说ribbon.eureka.ServerListRefreshInterval=60000
。现在我看到它每分钟刷新一次服务器列表,但延迟仍然在第 30秒发生。
有人可以告诉我第 30秒发生了什么吗?
我的祖尔配置:
spring:
application:
name: xxxx
profiles:
active: default
cloud:
config:
failFast: true
security:
enabled: false
main:
banner-mode: 'off'
eureka:
client:
enabled: false
registerWithEureka: false
fetchRegistry: false
zuul:
host:
connect-timeout-millis: 60000 # starting the connection
socket-timeout-millis: 60000 # monitor the continuous incoming data flow
sensitiveHeaders: Cookie,Set-Cookie
ignoredServices: '*'
routes:
auth:
path: /xxx/xx/**
stripPrefix: false
#url: http://localhost:9003/
xx:
path: /xx/xx/**
stripPrefix: false
#url: http://localhost:9002/
hystrix:
command:
default:
execution:
timeout:
enabled: false
ribbon:
ReadTimeout: 60000
ConnectTimeout: 120000
eureka:
enabled: false
security:
ignored: /**
basic:
enabled: false
management:
security:
enabled: false
xx:
ribbon:
eureka:
enabled: false
ServerListRefreshInterval: 60000
解决方案
推荐阅读
- kubernetes - 如何更改 Kubernetes 工作节点的内部 IP?
- javascript - 如何使用 php 将 mysql 查询加载到 chartjs?
- pyspark - 读取一个字符串并创建一个提到的子字符串数组
- android - 不能在同一方法中同时使用活动的 getCurrentActivity() 和 getSupportFragmentManager
- azure - Azure 凭据尚未设置或已过期,请运行 Connect-AzAccount
- java - Eclipse 仅为最后一个编辑的类生成 Javadocs
- ios - 故事板中的设备选择使 iphone x 和以前的视频播放器的 UI 有所不同:ios swift
- python - 无法在 python 中使用多线程读取/写入文件
- asp.net-mvc - 无法将 system.speech 包安装到 VS 项目中
- javascript - 从 Twig 到 Js 的数据不完整数组