Search code examples
spring-cloudhystrixfeign

Is there any relationship between feign clients 'readTimeout' and configuration of hystrix.execution.isolation.thread.timeoutInMilliseconds


First of all, I'm sorry for my bad at English :)

I have a question about relationship between feign clients 'readTimeout', 'connectTimeout' and configuration of hystrix.execution.isolation.thread.timeoutInMilliseconds.

I have used 'thread' option instead of semaphore when setting isolation.

Below are the relevant my settings.

hystrix:
  threadpool:
    A:
      coreSize: 5
      maximumSize: 5
      allowMaximumSizeToDivergeFromCoreSize: true


feign:
  client:
    config:
      A:
        connectTimeout: 500
        readTimeout: 500
        loggerLevel: basic

I hope you give an answer to me. 🙏


Solution

  • I found the answer. Hystrix's thread timeout priority is more precedes then Feign client timeout. Hystrix's thread timeout

    Test case
    1. condition:
    - the timeout that related to Feign: 2s
    - the timeout that related to Hystrix's thread: 1s
    
    2. result
    - Feign's timeout can't be work!