Welcome! Log In Create A New Profile

Advanced

Very slow dns lookup using proxy_pass

Anonymous User
January 03, 2014 10:42PM
I am seeing very slow DNS lookup times ( > 2 seconds ) using proxy_pass, even though dig response times on the server are quick. Here is the nginx configuration block:

location ~ ^/v1/(?<url>.*) {
resolver 8.8.4.4 4.4.4.4 valid=300s;
resolver_timeout 10s;
proxy_pass https://$remote_user.mydomain.com/api/;
proxy_hide_header Vary;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 10s;
proxy_read_timeout 60s;
proxy_ssl_session_reuse on;
}

I am using Google Public DNS. Here is a result from: dig demo.mydomain.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> demo.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37997
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;demo.mydomain.com. IN A

;; ANSWER SECTION:
demo.mydomain.com. 299 IN A X.X.X.X

;; Query time: 187 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Fri Jan 3 19:40:32 2014
;; MSG SIZE rcvd: 50

Any ideas why this is so slow, and solutions?
Subject Author Posted

Very slow dns lookup using proxy_pass

Anonymous User January 03, 2014 10:42PM

Re: Very slow dns lookup using proxy_pass

Jonathan Matthews January 03, 2014 10:54PM

Re: Very slow dns lookup using proxy_pass

Anonymous User January 03, 2014 11:11PM

Re: Very slow dns lookup using proxy_pass

justink101 January 06, 2014 03:34PM

Re: Very slow dns lookup using proxy_pass

Jonathan Matthews January 06, 2014 04:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready