-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
7fafbe3
to
4f1c584
Compare
4f1c584
to
b26fad9
Compare
0d8e929
to
77d51fc
Compare
77d51fc
to
8e5d734
Compare
options/namesys/opts.go
Outdated
func DefaultPublishOptions() PublishOptions { | ||
return PublishOptions{ | ||
EOL: time.Now().Add(defaultRecordEOL), | ||
TTL: time.Minute, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default should be moved to a const too (DefaultIPNSRecordTTL
).
💭 I wonder if 1 minute is a good default. We are caching IPNS lookup results for 1m in Kubo, so I understand setting TTL to 1m keeps the current behavior, but that is just bare minimum for performance reasons.
For context, when you add DNS record at many registrars, the default TTL for DNS records is either 12 hours or 1 hour, and is lowered manually by the user to 1 minute only for websites which need fast updates.
If we keep this low from the start, the performance improvement of TTL will be close to zero, because nobody will adjust it to a bigger value (tyranny of the default).
@hacdias I don't want to block this PR on the decision, let's go with 1m for now, but mind opening a PR against https://github.com/ipfs/specs/blob/main/ipns/IPNS.md#ipns-record that adds suggested default to be 12h, so we can then gather feedback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add that to my ToDos (today or tomorrow). Constant exported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this makes things less noisy by keeping all opt consts in the same place.
See ipfs/kubo#9471