9 ms·
Lambda is fundamentally message oriented, you send an invoke request, lambda will either route the request to an existing warm instance, or will boot a new inst
by WatchDog 4y ago
Lambda is fundamentally message oriented, you send an invoke request, lambda will either route the request to an existing warm instance, or will boot a new instance, it processes the request, then once the request is processed it will suspend itself.
Fly VM's are just VM's that can start quickly.
They don't seem to currently support a request/response based VM lifecycle.
If you wanted to use a fly VM in a lambda-like way, seems like you would need to have some kind of proxy to coordinate the work, ie start the VM via the API, have your VM process start a web server, once it's booted, send it a HTTP request, once the request is finished, shut down the VM via the API.
Also seems like fly can't suspend a running process, your process needs to start up every time you start a fly VM.
Lambda will suspend a VM between requests, keeping the process in memory for a few minutes.
Sending a subsequent request to a warm lambda is much faster then booting a lambda from scratch, particularly for JIT based language runtimes.