A small reference implementation demonstrating HTTP Range Requests for serving EPUB files without exposing the entire book in a single request.
This project was created as a technical spike while working at Árvore to evaluate content delivery strategies for EPUB readers.
Serving large EPUB files as complete downloads is often unnecessary.
Supporting HTTP Range Requests allows clients to request only the byte ranges they need, improving:
- startup latency
- bandwidth usage
- reader experience
- content protection by avoiding full-file downloads through the application layer
Rather than discussing the implementation theoretically, I built this repository as an executable proof of concept that the team could inspect, test and use as a reference before introducing the approach into production systems.
This is a pattern I've repeated throughout my career: when evaluating an architectural decision, I prefer building a small, focused prototype that removes uncertainty before committing to a production implementation.
- HTTP Range Requests
- HTTP 206 Partial Content responses
- Byte-range parsing
- Efficient EPUB streaming
- Protected content delivery
- Minimal Elixir/Phoenix implementation
Install dependencies:
mix deps.getStart the server:
iex -S mixRequest the first bytes of the sample book:
curl http://localhost:4000/book?isbn=123 \
-H "Range: bytes=0-4096" \
--output partial.epubThis repository is a standalone proof of concept created to validate and explain an architectural approach before production implementation.
It is intentionally small and focused on demonstrating the protocol rather than providing a production-ready EPUB server.
MIT