在关闭Eureka的情况下使用Zuul + Ribbon时,为什么布线会有延迟?

时间:2019-01-23 11:30:01

标签: spring spring-boot spring-cloud netflix-zuul

Zuul路由到微服务时,大约需要5毫秒,而在 30 秒,它会增加100毫秒+延迟。

我添加了ribbon.eureka.ServerListRefreshInterval=60000。现在,我看到它每分钟刷新一次服务器列表,但仍然在 30th 秒上发生延迟。

有人可以告诉我 30th 秒发生了什么吗?

我的Zuul配置:

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

0 个答案:

没有答案