Open mocyuto opened 3 years ago
We've ran into an issue where we set timeouts, but during high traffic/requests dax seems to not properly timeout. We setup our dax client as below...
sess := session.Must(session.NewSession()) cfg := dax.DefaultConfig() cfg.Credentials = sess.Config.Credentials cfg.Region = region cfg.HostPorts = []string{endpoint} cfg.RequestTimeout = 300 * time.Millisecond cfg.ReadRetries = 1 // default is 2 cfg.MaxPendingConnectionsPerHost = 100 // default is 10 cfg.DialContext = (&net.Dialer{ Timeout: 300 * time.Millisecond, KeepAlive: 30 * time.Second, }).DialContext client := dax.New(cfg)
During peak traffic hours we are seeing dax response take over 3 seconds. I'm suspecting dial connection to be using context.TODO instead of request context.
context.TODO
https://github.com/aws/aws-dax-go/blob/master/dax/internal/client/tubepool.go#L318
Thank you in advance!
@mocyuto were you able to find the root cause or a fix for this?
BTW the right code line now is https://github.com/aws/aws-dax-go/blob/master/dax/internal/client/tubepool.go#L341
Also see https://github.com/aws/aws-dax-go/issues/46
We've ran into an issue where we set timeouts, but during high traffic/requests dax seems to not properly timeout. We setup our dax client as below...
During peak traffic hours we are seeing dax response take over 3 seconds. I'm suspecting dial connection to be using
context.TODO
instead of request context.https://github.com/aws/aws-dax-go/blob/master/dax/internal/client/tubepool.go#L318
Thank you in advance!