Computing? In my HTTP request?



Introduction

Fastly's recently announced Compute@Edge platform allows you to run arbitrary code during an HTTP request: it's "serverless computing" that pushes the request life cycle into the content delivery layer. Built on WebAssembly, it allows any language that targets WASM to run on the edge and respond to user requests with excellent performance.

While in a private beta, Compute@Edge offers some powerful possibilities for the binary cache which can't easily be realized without using other proxy servers, and will make extending the whole system much easier.

<aside> ❔ Did you know: @Austin Seipp previously prototyped a design for the Nix cache using CloudFlare Workers, a similar serverless edge platform — then he got hired at Fastly, and now works on cache.nixos.org itself!

</aside>


Possible use cases

Below are a list of non-exhaustive use cases we could use Compute@Edge for.

Our own logging layer


Enhanced purging layer


Enriching .narinfo files with Link headers