3 ms·
> own serverless implementation Isn't this just cgi-bin, right down to the long startup time and lack of persistence?
by pjc50 9y ago
> own serverless implementation
Isn't this just cgi-bin, right down to the long startup time and lack of persistence?
- htgb 9y agoIs it? I'm under the impression that cgi-bin is a way to serve requests from the local computer, while Zerg is a way to spawn _other_ server instances to handle the request (and in Erlang, specifically).
- pjc50 9y agoYes, but you could let a load balancer handle that for you, and you might not need as many computers to handle the requests if it didn't take 250ms to start.
- sitkack 9y agoBooting a VM should be "as complex" as fork. And the memory image of the booted OS should be identical on each load before the end user specific data is loaded. "Prefork" these VMs by spraying that image over physical memory in advance, jump to them on a request. memcopy a new VM over them on exit. VM spawn rate should be the memcopy rate, if the MMU is powerful enough, should only be the amount of memory mutated during a request.
- jxf 9y agoIt's similar in intention, but "serverless is just `cgi-bin`" misses a lot of nuance. Zerg and cgi-bin are solving different problems and with different implementations. It's extremely difficult, if not impossible in some environments, to get the same kind of isolation with cgi-bin that you do out of a VM.
- catern 9y agoYou gain on isolation with Zerg (and other "VM per request" things) but you lose on everything else compared to CGI with processes. But you can reach comparable levels of isolation with processes: just use Linux namespaces.