Hystrix best practice for isolation strategy, THREAD vs SEMAPHORE

29 views
Skip to first unread message

Julian AFFAIRE

unread,
Nov 7, 2019, 10:55:53 AM11/7/19
to HystrixOSS
Hello,

Is there a best strategy to use for a services which use lot of call per seconds? Let's say 1000 request/seconds.
The call take like 300ms.

(300ms per call so ~3 calls/sec, = ~400 concurrents calls if I have 1000 request/sec)

If i use SEMAPHORE i configured: 
hystrix.command.MYCOMMAND.execution.isolation.thread.timeoutInMilliseconds=10000
hystrix.command.MYCOMMAND.circuitBreaker.requestVolumeThreshold=40
hystrix.command.MYCOMMAND.execution.isolation.semaphore.maxConcurrentRequests=400

If I use THREAD I configured:
hystrix.threadpool.MYCOMMANDPool.coreSize=5
hystrix.threadpool.MYCOMMANDPool.maximumSize=400
hystrix.threadpool.MYCOMMANDPool.keepAliveTimeMinutes=5
hystrix.threadpool.MYCOMMANDPool.allowMaximumSizeToDivergeFromCoreSize=true
hystrix.command.MYCOMMAND.execution.isolation.thread.timeoutInMilliseconds=10000
hystrix.command.MYCOMMAND.circuitBreaker.requestVolumeThreshold=40

Does this configuration make sence? And for this amount of calls, is it better to use THREAD or SEMAPHORE?

Thanks, 

Best regards.
Reply all
Reply to author
Forward
0 new messages