Very slow dns lookup using proxy_pass

justin nginx-forum at nginx.us
Sat Jan 4 04:11:02 UTC 2014


Hi Jonathan,

Using time is the only way I know how to demonstrate this:

FIRST TIME TOOK: 5.8 seconds

➜  ~  time curl -i -u demo: https://api.mydomain.com/v1/
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 04 Jan 2014 04:07:50 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31556926
Cache-Control: no-cache, no-store
Access-Control-Max-Age: 300
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS

{"version":"v1"} curl -i -u demo: https://api.mydomain.com/v1/  0.54s user
0.01s system 9% cpu 5.857 total

EXECUTED AGAIN, IMMEDIATELY AFTER. TOOK: 197ms

➜  ~  time curl -i -u demo: https://api.mydomain.com/v1/
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 04 Jan 2014 04:07:54 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31556926
Cache-Control: no-cache, no-store
Access-Control-Max-Age: 300
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS

{"version":"v1"} curl -i -u demo: https://api.mydomain.com/v1/  0.05s user
0.01s system 27% cpu 0.197 total

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246001,246003#msg-246003



More information about the nginx mailing list