[Pdns-users] how to make each record has it's own TTL for multiple records with the same name and type?

Brian Candler b.candler at pobox.com
Sat Jan 23 16:08:01 UTC 2021


On 23/01/2021 15:44, Mohamed Alsemany via Pdns-users wrote:
> I have this problem while using powerdns api , I can't use multiple 
> records with the same name and type with different TTL for each record !

Do you mean something like this?

foo.bar. IN 120 A 1.2.3.4
foo.bar. IN 60 A 5.6.7.8

This is not allowed. RFC 2181 <https://tools.ietf.org/html/rfc2181> says 
(section 5.2):

   "It is possible for
    the RRs in an RRSet to have different TTLs.  No uses for this have
    been found that cannot be better accomplished in other ways.  This
    can, however, cause partial replies (not marked "truncated") from a
    caching server, where the TTLs for some but not all the RRs in the
    RRSet have expired.

    Consequently the use of differing TTLs in an RRSet is hereby
    deprecated,*the TTLs of all RRs in an RRSet must be the same*.

    Should a client receive a response containing RRs from an RRSet with
    differing TTLs, it should treat this as an error.
...
    *In no case may a server send an RRSet with TTLs not all equal.*"

The powerdns API enforces this by only allowing you to set a single TTL 
at the RRset level:
https://doc.powerdns.com/authoritative/http-api/zone.html#rrset

HTH,

Brian.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20210123/d9406bc0/attachment.htm>


More information about the Pdns-users mailing list