【发布时间】:2017-09-19 14:08:43
【问题描述】:
我有一个 edge zuul 服务器服务,它将请求路由到 下游服务。
我同时使用 400 个线程对该架构进行负载测试
在下游服务中,总延迟仅为一秒。 在 edge 服务器 上使用 pre 和 post zuul 过滤器,我设法计算出平均延迟约为 7.5 秒,这与我从 hystrix.stream 端点获得的数字大致相同在我的 edge zuul 服务器
上启用{ "type":"HystrixCommand", “名称”:“认证”, "group":"RibbonCommand", “当前时间”:1492879164747, "isCircuitBreakerOpen":false, “错误百分比”:0, “错误计数”:0, “请求计数”:500, "rollingCountBadRequests":0, "rollingCountCollapsedRequests":0, "rollingCountEmit":0, "rollingCountExceptionsThrown":0, "rollingCountFailure":0, "rollingCountFallbackEmit":0, "rollingCountFallbackFailure":0, "rollingCountFallbackMissing":0, "rollingCountFallbackRejection":0, "rollingCountFallbackSuccess":0, "rollingCountResponsesFromCache":0, "rollingCountSemaphoreRejected":0, "rollingCountShortCircuited":0, “滚动计数成功”:492, "rollingCountThreadPoolRejected":0, “滚动计数超时”:0, "currentConcurrentExecutionCount":397, "rollingMaxConcurrentExecutionCount":399, “latencyExecute_mean”:7552, “延迟执行”:{ “0”:1003, “25”:8131, “50”:8359, “75”:8543, “90”:9095, “95”:10495, “99”:12311, “99.5”:12311, “100”:19551 }, "latencyTotal_mean":7552, “延迟总”:{ “0”:1003, “25”:8131, “50”:8359, “75”:8543, “90”:9095, “95”:10495, “99”:12311, “99.5”:12311, “100”:19551 }, “propertyValue_circuitBreakerRequestVolumeThreshold”:20, “propertyValue_circuitBreakerSleepWindowInMilliseconds”:5000, "propertyValue_circuitBreakerErrorThresholdPercentage":50, “propertyValue_circuitBreakerForceOpen”:假, “propertyValue_circuitBreakerForceClosed”:假, “propertyValue_circuitBreakerEnabled”:真, "propertyValue_executionIsolationStrategy":"SEMAPHORE", “propertyValue_executionIsolationThreadTimeoutInMilliseconds”:200000, "propertyValue_executionTimeoutInMilliseconds":200000, “propertyValue_executionIsolationThreadInterruptOnTimeout”:真, "propertyValue_executionIsolationThreadPoolKeyOverride":null, “propertyValue_executionIsolationSemaphoreMaxConcurrentRequests”:5000, “propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests”:10, “propertyValue_metricsRollingStatisticalWindowInMilliseconds”:10000, “propertyValue_requestCacheEnabled”:真, “propertyValue_requestLogEnabled”:真, “报告主机”:1, “线程池”:“功能区命令” }
考虑到边缘服务器和下游服务都在同一个内部网络上,并且给定了这些属性值
server.tomcat.max-threads=5000
zuul.host.max-per-route-connections=5000
zuul.host.max-total-connections=10000
下游服务名称:认证
zuul.eureka.authenticate.semaphore.maxSemaphores=5000
我在边缘服务器和下游服务中都设置了属性 server.tomcat.max-threads=5000
为什么边缘服务器的延迟如此之高?如何消除它或如何追踪延迟发生的位置?
我使用spring boot 1.4.0.RELEASE版本同时构建边缘服务器和下游服务
【问题讨论】:
-
你用的是哪个版本的spring cloud?
-
Brixton.RELEASE
标签: spring-boot netflix-zuul hystrix spring-cloud-netflix