You can also enable it via config under Ipns.UsePubsub
.
Something I noticed is that most people who report “IPNS is slow” use default 1h cache TTL, or even worse, set it to multiple days.
With that in mind, you can do two things to lower update propagation time:
- As Publisher: when you publish IPNS Record, the default TTL that controls caching is set to 1h. If you want third-party gateways and nodes to skip cache and look for updates more often, consider lowering this value.
- Kubo: see
--ttl
inipfs name publish --help
- Note: If you use IPNS Record behind a DNSLink (
/ipns/example.com
pointing at/ipns/k51..libp2p-key
), the DNS TXT record at_dnslink.example.com
) has its own TTL, and it will also impact caching. Make sure both TTLs are the same.
- Kubo: see
- As Gateway Operator: you should have the ability to override publisher-provided TTL and cap caching resolution results at a lower value.
- Kubo:
Ipns.MaxCacheTTL
- Rainbow:
RAINBOW_IPNS_MAX_CACHE_TTL
- Kubo: