0

This is just a question, not sure if its expected or a real problem.

We have four PowerDNS servers (shared backend is a mysql galera cluster) behind a dnsdist loadbalancer.

When making queries against the dnsdist instance sometimes we get different TTLs responses, is this expected or the TTL response should be the same for all the servers (taking the packetcaching in consideration)?

Example digs:

dig @10.92.173.60 address.domain.com
;; ANSWER SECTION:
address.domain.com.    300    IN    A    10.92.170.89

;; Query time: 81 msec
;; SERVER: 10.92.173.60#53(10.92.173.60)
;; WHEN: Wed Jul 31 17:22:02 WEST 2019
;; MSG SIZE  rcvd: 135

dig @10.92.173.60 address.domain.com
;; ANSWER SECTION:
address.domain.com.    156    IN    A    10.92.170.89

;; Query time: 49 msec
;; SERVER: 10.92.173.60#53(10.92.173.60)
;; WHEN: Wed Jul 31 17:22:03 WEST 2019
;; MSG SIZE  rcvd: 135

Thanks

1 Answers1

1

It's an expected behavior. In the answers you see the time until to death of the record in the cache of a server. If you'll repeat resolve of the same record, you'll see decreasing of TTL of the record.

Anton Danilov
  • 4,874
  • 2
  • 11
  • 20
  • I know the TTL will always decrease. What I'm asking is if different powerdns servers with the same shared backend should have the TTL synced between them (all of them answering with the same TTL). – Carlos Florêncio Jul 31 '19 at 21:51