Spring-cloud-gateway: Request timeout

Created on 18 Apr 2018  路  3Comments  路  Source: spring-cloud/spring-cloud-gateway

Is there a way to set the request timeout? I don't find anything in the application.yml configuration file. The issue it is causing is, if couple of old requests, which take longer time to complete, are still processing and user tries to refresh the GUI, the refresh call does nothing as requests are queued for older request to complete.

I was wondering if it can be done so that user experience can be improved.

Spring cloud Gateway Version : 2.0.0.BUILD-SNAPSHOT
Spring Cloud Version : Finchley.BUILD-SNAPSHOT
Netty Version: 4.1.19.Final
Reactor Netty Version : 0.7.5.RELEASE

question

Most helpful comment

Timeouts can be managed by Hystrix as mentioned in #291 , @manishonline.

If you have a Hystrix filter that looks like this:

spring:
  cloud:
    gateway:
      routes:
      - id: hystrix_route
        uri: http://example.org
        filters:
        - Hystrix=myCommandName

then you should be able to set a timeout like this:
hystrix.command.myCommandName.execution.isolation.thread.timeoutInMilliseconds: 5000

All 3 comments

Timeouts can be managed by Hystrix as mentioned in #291 , @manishonline.

If you have a Hystrix filter that looks like this:

spring:
  cloud:
    gateway:
      routes:
      - id: hystrix_route
        uri: http://example.org
        filters:
        - Hystrix=myCommandName

then you should be able to set a timeout like this:
hystrix.command.myCommandName.execution.isolation.thread.timeoutInMilliseconds: 5000

Hi how to configure timeouts if we are using isolation strategy semophore in Hystrix.

Closing as answered.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maoyunfei picture maoyunfei  路  3Comments

xfworld picture xfworld  路  3Comments

samtonyclarke picture samtonyclarke  路  3Comments

ryanjbaxter picture ryanjbaxter  路  6Comments

thirunar picture thirunar  路  6Comments