I have a little blog (you’re reading it) and it was served from static files with caddy on a little GCE VM. I recently decided to reimplement it using GCS, in part because I was running out of disk space. Approach:
- Requests go into caddy.
- Caddy proxies requests to a trivial GCS server that reads the data, including content type and last modified, from GCS and serves it as a http request.
The server supports range requests, by opening the object and seeking within it to the data.