How Momento Functions runs your code
Momento Functions is a stateless execution layer that runs on Momento's horizontally scalable router fleet. Each invocation is its own sandbox, isolated from every other invocation and from the host. Understanding the runtime model is helpful to write fast, predictable Functions and to know which features are available to you.
The execution model
Every invocation creates a fresh WebAssembly sandbox, runs your Function's entry point, and discards the sandbox when the response is sent. There is no warm pool, no per-tenant container, and no shared memory between invocations. If you need to persist state across calls, you do that explicitly using Momento Cache, or any other store you prefer like S3 or DynamoDB.
The concept is familiar to AWS Lambda, but the unit of isolation is much smaller: Where Lambda gives you a micro-VM with a Linux userland, Functions gives you a wasmtime instance running pre-compiled, pre-linked WebAssembly. That's why "cold starts" are measured in microseconds rather than hundreds of milliseconds. It's basically a stack versus a VM.