Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

gateway & p2p improvements #264

Closed
Arqu opened this issue May 24, 2022 · 2 comments
Closed

gateway & p2p improvements #264

Arqu opened this issue May 24, 2022 · 2 comments

Comments

@Arqu
Copy link
Collaborator

Arqu commented May 24, 2022

Currently many requests go and invoke fetch_bitswap with an empty provider list (ref trace ID 2b90b66cb34b936f005cde120d35de0e). We should fail fast here and return 404 or something similar.

The response from the resolver on gateway should be a stream, both to avoid loading everything into memory and significantly reduce the time to first byte which is currently t(fetch_bitswap) + some_overhead while it could be t(fetch_bitswap_first_byte) + some_overhead. This also allows us to return metrics like time to first byte/block, latency vs time etc.

@dignifiedquire
Copy link
Contributor

The response from the resolver on gateway should be a stream

Given that our blocks are limited at 2MiB, and that neither our DB nor the rpc layer are currently streaming them, I am not sure this is actually worth the work currently.

@Arqu
Copy link
Collaborator Author

Arqu commented May 24, 2022

The response from the resolver on gateway should be a stream

Given that our blocks are limited at 2MiB, and that neither our DB nor the rpc layer are currently streaming them, I am not sure this is actually worth the work currently.

Agree, this was more a "we should do it eventually thing"

dignifiedquire referenced this issue in n0-computer/iroh May 24, 2022
dignifiedquire referenced this issue in n0-computer/iroh May 24, 2022
@Arqu Arqu closed this as completed May 30, 2022
@dignifiedquire dignifiedquire transferred this issue from n0-computer/iroh Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants