4
閱讀了關於Spring雲Zuul的文檔後,我已經理解,通過SEMAPHORE隔離和大約2個最大併發請求,Zuul服務器可以輕鬆處理大約5000個rps。當我試圖從Jmeter調用服務時,它的值大約爲2000,它拋出以下異常並顯示錯誤率爲100%。無法獲取信號量--Zuul配置
com.netflix.hystrix.exception.HystrixRuntimeException:
Service1 could not acquire a semaphore for execution and no fallback available.
然後我就碰到了最大併發請求數20萬,但仍然它拋出的異常,但錯誤率已經下降到10%。 您能否讓我知道原因。這是因爲Spring雲Zuul中的微服務緩慢或任何配置問題?下面是配置:
ribbon:
ConnectTimeout: 20000000
ReadTimeout: 20000000
MaxTotalHttpConnections: 5000
MaxHttpConnectionsPerHost: 5000
ActiveConnectionsLimit: 4000
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 20000000
zuul.hystrix.command.default.execution.isolation.strategy: SEMAPHORE
zuul.hystrix.command.default.execution.isolation.semaphore.maxConcurrentRequests: 2000
zuul.hystrix.command.default.fallback.isolation.semaphore.maxConcurrentRequests: 2000
zuul.eureka.default.semaphore.maxSemaphores: 30000
我可以知道您測試的zuul版本嗎? @Mavlarn – Joey
春天的雲版本Camden.SR2和netflix zuul版本是1.3.0 – Mavlarn
是的,我們使用zuul 1.1.2,這就是爲什麼它不工作。我已經檢查過代碼,以後有更新的版本。 – Joey