Opened 12 years ago
Closed 12 years ago
#331 closed defect (duplicate)
incorrect resolver behavior cname ttl
Reported by: | openid.yandex.ru/pl-xek | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | nginx-core | Version: | 1.2.x |
Keywords: | resolver | Cc: | pl-xek@… |
uname -a: | Linux hostname 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.2.7
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-52) TLS SNI support disabled configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_secure_link_module --with-http_random_index_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-http_geoip_module --with-mail --with-mail_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ipv6 --with-file-aio --with-debug |
Description
nginx resolver doesn't care of TTL for CNAME records.
E.g., DNS config:
upstream 60 CNAME cname1 cname1 86400 A 10.10.10.10
Tests shows, that upstream resolved once per day.
Should be every 60 seconds.
Tested on 1.2.7, 1.3.15
Comment from Maxim Dounin in nginx-ru list:
Во встроенном резолвере не очень хорошо сделана обработка
нескольких записей в одном DNS-ответе, и в частности в
вышеописанном случае, если обе записи приходят вместе - то CNAME
будет "пропущен", и кеш resolver'а попадёт сразу адрес, с ttl
86400.
Note:
See TracTickets
for help on using tickets.
Thanks for the report -- we have already filled ticked #329 for this issue. I mark this ticket as a duplicate.