Glossary
What is chunked upload?
Chunked upload sends a session recording to the server in small numbered batches while the session is running, so a closed tab loses seconds, not minutes.
Updated · 1 min read
Chunked upload is the practice of splitting a session recording into small, sequentially numbered batches of events and sending each one as soon as it is full or a timer fires, instead of uploading the whole session at the end.
Why it matters
Sessions end abruptly. A user closes the tab, the phone kills the app, the network drops. If the recording only leaves the device when the session ends, those are exactly the sessions you lose, and they are often the ones you wanted to see.
Small batches also keep memory flat on the user's device and let the server start storing and indexing a session before it is over. Numbering the batches lets the server notice a gap or a repeat, which matters because the incremental snapshots inside only make sense in order.
How AnyReplay handles it
The AnyReplay web SDK flushes a chunk after 200 events or every 5 seconds, whichever comes first (maxEventsPerChunk and flushIntervalMs), and cuts it at about 256 KB too, so a backlog after an outage leaves as several requests. Each chunk carries flags such as hasError, hasRageClick and pageCount, so the dashboard can list interesting sessions without opening them. The ingest service accepts bodies up to 512 KB by default and is idempotent: a repeated (session, seq) pair answers 202 with duplicate: true and a nextSeq hint. The last chunk of a session goes out through sendBeacon, and a failed chunk is kept and retried with backoff rather than tripping a circuit breaker.