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

Server Timing API #167

Open
lidel opened this issue Aug 12, 2020 · 0 comments
Open

Server Timing API #167

lidel opened this issue Aug 12, 2020 · 0 comments
Labels
dif/expert Extensive knowledge (implications, ramifications) required effort/weeks Estimated to take multiple weeks kind/enhancement A net-new feature or an improvement to an existing feature need/analysis Needs further analysis before proceeding P3 Low: Not priority right now

Comments

@lidel
Copy link
Member

lidel commented Aug 12, 2020

The Server Timing API allows you to pass request-specific timing data from your server to the browser via response headers

Potential uses

In IPFS context, it could be a way for HTTP Gateway to indicate how long it took to

  • execute specific subtask of /api/v0/ call
  • return valid data for /ipfs/* request, namely:
    • lookup data in local datastore (if present) or find it on the swarm
    • discover providers (could have separate metrics for dht, bitswap)
    • download data from providers etc

Improved debugging

As illustrated by @Gozala in ipfs/ipfs-webui#1534 (comment)
I think bifrost team and other gateway providers could leverage it for debugging gateway performance when processing a specific request.

Improved UX in browser context

User agents (eg. IPFS-aware web browser) could utilize hints passed in Server Timing headers to improve user experience by providing higher resolution feedback about the state of request.

Example

> GET /ipfs/QmFoo HTTP/1.1
> Host: ipfs.io


< HTTP/1.1 200 OK
< Server-Timing: miss, ds;dur=53, dht;dur=47.2, bitswap;dur=120
< Server-Timing: cache;dur=23.2

References

@lidel lidel added kind/enhancement A net-new feature or an improvement to an existing feature dif/expert Extensive knowledge (implications, ramifications) required P3 Low: Not priority right now need/analysis Needs further analysis before proceeding effort/weeks Estimated to take multiple weeks labels Aug 12, 2020
@galargh galargh moved this to To do in IPFS-GUI (PL EngRes) Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/expert Extensive knowledge (implications, ramifications) required effort/weeks Estimated to take multiple weeks kind/enhancement A net-new feature or an improvement to an existing feature need/analysis Needs further analysis before proceeding P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

1 participant