Regional gateway for chunked object upload, background transcode callbacks and cache-bypassed delivery of large media assets. Designed for clients on unreliable mobile links: resumable sessions, per-chunk acknowledgement, no server-side buffering.
Sessions survive network changes. Each chunk is acknowledged independently and replayed on reconnect without restarting the transfer.
Request and response buffering are disabled end to end, so first byte is emitted as soon as the origin produces it.
All gateway routes are served with no-store. Only static assets under the site root are cacheable at the edge.
| Method | Path | Description |
|---|---|---|
| GET | /health | Liveness probe. Returns service name and build version as JSON. |
| POST | /api/v2/sync | Opens an upload session and streams chunks. Session state is carried in request headers; sequence numbers in the query string. |
| GET | /api/v2/sync/{id} | Reads back session progress and the manifest of accepted chunks. |
$ curl -s https://media-gateway.internal/health
{"status":"ok","service":"media-gateway","version":"4.2.1"}
$ curl -s -X POST \
-H 'X-Upload-Token: <session>' \
--data-binary @chunk.bin \
'https://media-gateway.internal/api/v2/sync?page=1'
Ingress accepting sessions. No degraded routes reported.
Backlog within normal range. Callbacks delivered on schedule.
Static assets served from edge. Gateway routes bypass cache by design.