Giter VIP home page Giter VIP logo

Comments (3)

milkwine avatar milkwine commented on August 25, 2024 3

It seems HTTPTimeout not realy affect hystrix.Client.client

func NewClient(opts ...Option) *Client {
client := Client{
client: httpclient.NewClient(),
timeout: defaultHTTPTimeout,
hystrixTimeout: defaultHystrixTimeout,
maxConcurrentRequests: defaultMaxConcurrentRequests,
errorPercentThreshold: defaultErrorPercentThreshold,
sleepWindow: defaultSleepWindow,
requestVolumeThreshold: defaultRequestVolumeThreshold,
retryCount: defaultHystrixRetryCount,
retrier: heimdall.NewNoRetrier(),
}
for _, opt := range opts {
opt(&client)
}

// WithHTTPTimeout sets hystrix timeout
func WithHTTPTimeout(timeout time.Duration) Option {
return func(c *Client) {
c.timeout = timeout
}
}

from heimdall.

Kaustavd avatar Kaustavd commented on August 25, 2024

I feel there should be 2 different timeouts as within hystrix method there might be other commands also getting executed like http connection setup (if connection is not reused) etc.

from heimdall.

pmitra43 avatar pmitra43 commented on August 25, 2024

client.Timeout is not being passed on to hystrix setup. Ref: https://github.com/gojek/heimdall/blob/master/hystrix/hystrix_client.go#L80

It seems like a duplicate of the httpClient option. Ref: https://github.com/gojek/heimdall/blob/master/httpclient/client.go#L46

Is it safe to remove timeout config from hystrix and the WithHTTPTimeout option?

from heimdall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.