Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/devp2p: tweak DNS TTLs #20801

Merged
merged 2 commits into from
Mar 26, 2020
Merged

cmd/devp2p: tweak DNS TTLs #20801

merged 2 commits into from
Mar 26, 2020

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Mar 23, 2020

This increases the TTL on tree root records to enable some caching.
It also decreases the TTL on the leaves to a saner value.

rootTTL = 1
treeNodeTTL = 2147483647
rootTTL = 30 * 60 // 30 min
treeNodeTTL = 2 * 7 * 24 * 60 * 60 // 2 weeks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to decrease this? AFAIK this thing is immutable.

Copy link
Contributor Author

@fjl fjl Mar 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just thought the previous one was ridiculously high. Most DNS caches won't keep things forever anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the highest that Cloudflare allowed. I know they won't keep it forever, but the current code will just cause everyone to rerequest everything every 2 weeks.

@karalabe karalabe added this to the 1.9.13 milestone Mar 26, 2020
@karalabe karalabe merged commit 1583e7d into ethereum:master Mar 26, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
* cmd/devp2p: tweak DNS TTLs

* cmd/devp2p: bump treeNodeTTL to four weeks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants