-
Notifications
You must be signed in to change notification settings - Fork 39
add someguy cached router blog post #718
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
Conversation
2color
commented
Aug 28, 2025
- delegated routing cached router
- update permalink
- add diagram
🚀 Build Preview on IPFS ready
|
lidel
left a comment
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 @2color, overall lgtm, most of my feedback is cosmetic.
Some things that need more work:
- I was unable to build locally nor there is a preview – any idea whats going on?
- Rephrase thee sections to make a stronger points (details inline, feel free to adjust my suggestions)
src/_blog/2025-someguy-pr90.md
Outdated
|
|
||
| Another hypothesis is that the active probing in the background accelerates DHT lookups, especially for duplicate requests, thereby reducing the latency of DHT lookup. This is an area for further investigation | ||
|
|
||
| Either way, these results indicate that the cached address book and active probing have no negative impact on latency or success rates, and may even improve them. |
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.
We could teframe this to project more confidence. Too easy to poke holes in it:
- The P95 latency improvement (1.91s → 1.35s) is mentioned but then immediately undermined with "It's not entirely clear why this is
the case" - The speculation about provider churn seems out of place (if providers went offline between experiments, that would make the cache look.. worse not better (since cached addresses might be stale))
- The IPNI mention feels like a distraction - it's about a completely different system and doesn't help explain the results
- The "hypothesis about background probing" is interesting but vague
Perhaps we just capitalize on the things we know and clear latency improvement?
| Either way, these results indicate that the cached address book and active probing have no negative impact on latency or success rates, and may even improve them. | |
| ### Key insights | |
| With peer address caching enabled, we observed unexpected improvements beyond just address availability: | |
| - P95 latency for successful responses improved from 1.91s to 1.35s (29% faster) | |
| - Success rate increased from 52.0% to 57.2% | |
| These improvements likely stem from the active background probing, which pre-validates peer connectivity. When duplicate CIDs are requested, Someguy can immediately return known-good peers from cache, accelerating the routing and avoiding DHT traversal for subsequent lookups of the same content. | |
| The results demonstrate that the cached address book and active probing have no negative impact on latency or success rates, and actually improve both metrics. |
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.
I agree with the feedback.
My reading of the code suggest the following is not accurate:
When duplicate CIDs are requested, Someguy can immediately return known-good peers from cache, accelerating the routing and avoiding DHT traversal for subsequent lookups of the same content.
Someguy doesn't actually do this. Someguy only uses the peer cache after the kad-dht providers lookup yields a value (https://github.com/ipfs/someguy/blob/main/server_cached_router.go#L61-L69) and even then the iterator only adds cached peer addresses if there are none: https://github.com/ipfs/someguy/blob/main/server_cached_router.go#L93-L101
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.
I looked in the go-libp2p-kad-dht and and there fallback to address book: The code doesn't implement any fallback mechanism to consult the address book when RPC responses contain no addresses. So if a provider comes back with an empty address list (prov.Addrs), no addresses are added.
Co-authored-by: Marcin Rataj <[email protected]>
Co-authored-by: Marcin Rataj <[email protected]>
Co-authored-by: Marcin Rataj <[email protected]>
Co-authored-by: Marcin Rataj <[email protected]>
lidel
left a comment
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.
Lgtm, but we need to remove below duplicated sections.
Co-authored-by: Marcin Rataj <[email protected]>