Faster Than a Blink: Globally Distributed Wasm Functions on Akamai by Kate Goldenring
ScyllaDB
0 views
22 slides
Oct 13, 2025
Slide 1 of 22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
About This Presentation
Users start noticing lag after just 100 milliseconds (a blink of an eye) making latency a critical challenge for modern, globally distributed applications. In this talk, Kate shares how Akamai and Fermyon partnered to beat that blink, minimizing both network and compute latency by deploying Spin-bas...
Users start noticing lag after just 100 milliseconds (a blink of an eye) making latency a critical challenge for modern, globally distributed applications. In this talk, Kate shares how Akamai and Fermyon partnered to beat that blink, minimizing both network and compute latency by deploying Spin-based WebAssembly functions across the Akamai Cloud. She’ll explore how this architecture enables polyglot, sub-millisecond serverless functions with global availability and lightning-fast responsiveness.
Size: 1.6 MB
Language: en
Added: Oct 13, 2025
Slides: 22 pages
Slide Content
A ScyllaDB Community
Faster than a Blink:
Globally Distributed Wasm
Functions on Akamai
Kate Goldenring
Senior Software Engineer
Kate Goldenring (she/her)
Senior Software Engineer
■Open source developer (Spin, Akri, Wasm
component-docs)
■Co-chair of the Bytecode Alliance Documentation SIG
■Passionate about software sustainability
■Mountaineering instructor
What a blink is worth
A blink of an eye takes 100ms
■Users start noticing latency after 100 ms - Nielsen, 1993
■Every 100ms in added page load time costs 1% in revenue - Amazon
Total latency = network time + compute time
Network Time
Serverless Functions (Azure Functions, AWS Lambda, etc.)
Compute Time
Network Time
Fermyon cuts down the compute time:
Compute
Time
Network
Time
Akamai cuts down network time:
Compute
Time
0 ms 400 ms
Fermyon Wasm Functions
A multi-tenant, hosted, globally distributed engine for edge functions running on
Akamai Cloud, the most distributed cloud network
■Faster than the blink of an eye
■Supports multiple languages
■Fast, global deployments
■Secure Wasm sandbox
https://www.fermyon.com/wasm-functions
Why Wasm on the Server
Small packages
A hello-world Spin
WebAssembly
application written in
Rust is a 284kB OCI
Artifact.
They start up
almost
immediately
A Spin WebAssembly
component will start
in less than a
millisecond (0.51ms)
They are
sandboxed
WebAssembly
components are
sandboxed and are by
default denied access
to resources on the
system.
They are portable
You can swap out the
underlying nodes
processor architecture
without having to
produce separate
pipelines and deploy
artifacts.
Traditional vs edge functions
Fastly / CloudFlare / Fermyon Wasm
Functions. Global functions with
instant cold starts.
Traditional Functions
Edge Functions
AWS Lambda / Azure Functions / GCF.
Expensive, unperformant.
Supported
Languages
Isolation
Mechanism
2-7
Languages
Wasm
V8 Isolates
Broad
support
MicroVMs
Containers
Regions
Cold
Starts
<5 ms
200+ ms
Global POPs
Single Region
Taking Edge functions further with FWF
Traditional Functions
Edge Functions
Fermyon Wasm Functions
Fastly / CloudFlare / Fermyon Wasm
Functions. Global functions with
instant cold starts.
AWS Lambda / Azure Functions / GCF.
Expensive, unperformant.
Extend your performance with OSS
Spin Wasm functions
Supported
Languages
Isolation
Mechanism
2-7
Languages
Wasm
V8 Isolates
Broad
support
MicroVMs
Containers
7 Languages Wasm
Regions
Cold
Starts
<5 ms
200+ ms
<1 ms
(0.51 ms)
Global POPs
Single Region
Notes
Global POPs
No cloud lock-in
Fast start up
OSS tooling
<1 min to deploy
Cloud lock-in
Fast start up
Cloud lock-in
Not suitable for latency
sensitive apps
Spin Up
https://www.loom.com/share/2330f822179d4dc18fb630ac624738cc?sid=2c6022f6-cef0-4609-bf22-40543aa76ba4
Spin Developer Experience
Develop, test locally and deploy your app using Spin, the open source CNCF tool
for serverless Wasm
https://spinframework.dev/
High Performance Redirects Wasm Function
Large-scale HTTP redirect service implemented as a Spin application.
■Fast: O(1) lookup times with minimal memory footprint
■Scalable: Easily handles millions of redirects
■Pre-initialized: Embeds optimized representations of redirect data into the
Wasm binary at build time for zero-cost cold starts
■Hosted: Runs on Fermyon Wasm Functions
Pre-initializing the function with redirects
https://github.com/fermyon/fwf-examples/tree/main/samples/large-scale-redirects
Wizer to Preinitialize Redirects
#[export_name = "wizer.initialize"]
pub extern "C" fn init() {
let mut sources_file = File::open("sources.fst").unwrap();
let size = sources_file.metadata().unwrap().len();
let mut sources_bytes = vec![0; size as usize];
sources_file.read_exact(&mut sources_bytes).unwrap();
let sources_fst = fst::Map::new(sources_bytes).unwrap();
SOURCES.set(sources_fst).unwrap();
let targets_file = File::open("targets.fcsd").unwrap();
let reader = BufReader::new(targets_file);
let set = fcsd::Set::deserialize_from(reader).unwrap();
let _ = TARGETS.set(set);
}
The WASI Redirect Function
impl wasi::exports::http::incoming_handler::Guest for MyIncomingHandler {
fn handle(request: IncomingRequest, response_out: ResponseOutparam) {
let headers = Fields::new();
let sources = SOURCES.get().unwrap();
if let Some(index) = sources.get(request.path_with_query().unwrap()) {
let targets = TARGETS.get().unwrap();
let redirect = targets.decoder().run(index as usize);
let header = String::from("Location");
headers.set(&header, &[redirect]).unwrap();
}
ResponseOutparam::set(response_out, Ok(OutgoingResponse::new(headers)));
}
}
Small binaries, 1.25s builds, 1mil redirects
# Compile the application as a Wasm module
» cargo build --target wasm32-wasip1 --release
# Pre-initialize the Wasm module with the redirects data
» echo "sources.fst" "targets.fcsd" | wizer --allow-wasi --wasm-bulk-memory true
--dir . -o target/redirect.wasm target/wasm32-wasip1/release/redirects_rs.wasm
# Get the final size
» ls -lh target/redirect.wasm | awk '{print $5}'
35 M
Test locally
» spin up
Logging component stdio to ".spin/logs/"
Serving http://127.0.0.1:3000
Available Routes:
redirects-rs: http://127.0.0.1:3000 (wildcard)
Deploy globally in seconds
» spin aka deploy
Name of new app: redirects
Creating new app redirects in account kate-goldenring
Note: If you would instead like to deploy to an existing app, cancel this deploy
and link this workspace to the app with `spin aka app link`
OK to continue? yes
Workspace linked to app redirects
Waiting for app to be ready... ready