Skip to content

Videos take 1-2s to start because the IPFS gateway has no range support #52

Description

@Bielcx

Problem

Opening the app and going to the Videos tab, or opening a clip from a profile grid, takes a visible moment before anything plays. It is the first impression of the app's main surface, and it is not the phone or the connection — it is the gateway.

What was measured

While investigating #23, ipfs.skatehive.app showed:

  • TTFB of 1.0–1.8s before the first byte of a video.
  • No Content-Length header.
  • Range requests ignored — the response is not partial.

That last pair is what hurts most. Without range support the player cannot ask for just the opening of the file to start rendering; it waits on a stream whose size it does not know. Every clip pays the full latency before the first frame, every time it is not warm in cache.

What the app already does about it

Nothing left, on the app side, that is cheap:

But the Videos tab and the viewer have to fetch the actual video, and there the gateway is the floor.

What would actually fix it

Server side, roughly in order of impact:

  1. Support HTTP Range on video responses, so players can start on the first chunk.
  2. Send Content-Length.
  3. Put a CDN in front of the gateway so a popular clip is not re-fetched from IPFS per viewer.

Notes

Suggested label: performance, infra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions