4 ms·
you can usually configure them, see for example http://nginx.org/en/docs/http/ngx_http_core_module.html#send_timeout http://nginx.org/en/docs/http/ngx_http_core
by kevinburke 10y ago
you can usually configure them, see for example http://nginx.org/en/docs/http/ngx_http_core_module.html#send_timeout http://nginx.org/en/docs/http/ngx_http_core_module.html#send... and http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout http://nginx.org/en/docs/http/ngx_http_proxy_module.html#pro...
The difference is Nginx sets timeouts based on the time between successive byte reads or writes, so for example if you have a 30 second timeout and receive one byte every 29 seconds, you won't trigger Nginx's timeouts: https://kev.inburke.com/slides/reliable-http/#connect-timeout-requests https://kev.inburke.com/slides/reliable-http/#connect-timeou...
Go generally prefers wall-clock timeouts for reading or writing the entire response, that is, if you don't get the whole thing in 30 seconds, return an error, regardless of when you received each individual byte. Although you can configure Nginx-style timeouts if you want.