12 ms·
Zerg: Boot a VM instance per request, all in under 250 ms
- tylerhou 9y agoIt seems like the demo is down from high traffic; here's an archive link for those who can't see it: https://web.archive.org/web/20171227080115/http://zerg.erlangonxen.org/ https://web.archive.org/web/20171227080115/http://zerg.erlan...
- maxpert 9y agoOver capacity error
- skocznymroczny 9y agoNeed more overlords
- berbec 9y agoYou must construct additional Pylons
- AntiRush 9y agoI always thought ZeroVM was a cool idea in this space. The NaCL runtime makes a lot of sense as a base for servers that can take advantage of existing libraries. http://www.zerovm.org http://www.zerovm.org
- Smerity 9y agoAfter reading about ZeroVM I was incredibly excited - but then saw the last Git commit was in January 2015 =[ Is it considered "stable" or is it simply abandoned? Are there any successors? Near zero overhead VM acting on data storage is something I'll need for a planned project of my own.
- justincormack 9y agoIt is abandoned, Rackspace laid them off. NaCl is still stable, although the team is working on Web Assembly now which is a replacement (but less mature). ZeroVM does still work but is a pain to build.
- waits 9y ago> Server over capacity Ah, there’s the rub.
- exikyut 9y ago> Over capacity > The demo is limited to 16 concurrent instances and 2 libvirt connections. Due to these limitations we were unable to spawn a new instance to service your request. Please try again later. Kool.
- robert-boehnke 9y agoThey should spawn more overlords instead.
- sova 9y agoYou have not enough Vespene Gas
- tfcata 9y agoOverlords only need mineral, 100 each.
- sova 9y agoYou're right. Mea culpa, I always played Protoss.
- keeganpoppen 9y agoin case you haven’t already noticed, hacker news is not a place for jokes...
- daodedickinson 9y agoWe require more mineralsssss
- AdamJacobMuller 9y agoDid they just inadvertently point out why this is a bad idea for anything general-purpose?
- MBCook 9y agoIt seems I managed to get through right before it went down. Sort of a neat idea. But is it really worth starting up a new VM for each request? That seems to be the majority (380 ms?) of the time spent. Slightly off-topic: the page lists be time for an android phone to boot as 50 seconds. Is that correct? I remember iPhones used to take forever but I recently realized that they sing to boot extremely fast. I have no idea when that change happened.
- CalChris 9y agoI timed my iPhone SE when I read that. 25 seconds. So I tried rebooting with all of my apps exited. 25 seconds.
- MBCook 9y agoI just tested my iPhone 8, it’s 20s to login screen. Actually slower than I thought. I found an old blog post that says an iPhone 5 took about 35s, the slowest of the models they tested. 2x is nice but maybe it didn’t improve as much as I had thought. https://www.ifixyouri.com/blog/iphone-6s-bootup-time-comparison-vs.-6-vs.-5s-vs.-5-vs.-4-vs.-3gs/ https://www.ifixyouri.com/blog/iphone-6s-bootup-time-compari...
- nautilus12 9y agoI think they did it this way deliberately as a kind of proof of concept.
- MBCook 9y agoThat makes sense, but even if everything else takes three seconds (that’s overwhelming the small VM book time) I’m not sure what the real benefit of this is. I’m sure it’s technically more secure than a sandboxed application running in its own VM in its own process but by how much?
- joombaga 9y agoJust tested my Pixel 1. It takes 24 seconds from button press to lock screen, and another 18 seconds for me to type my password and display everything on the home screen, but I'm a slow mobile typer and my password is 16 characters.
- upbeatlinux 9y agoDidn't Rackspace acquire ZeroVM during it's 2010-2013 SaaS buying spree? I'd anticipated seeing ZeroVM as some part of their "cloud" offering but it looks like it was rolled into OpenStack Swift. Has Cloud Files performance improved at all in the past 4 years and how much of this can be attributed to ZeroVM (a lot of ignorance in this question I know).
- sairamkunala 9y agoHere's the google cached version - http://webcache.googleusercontent.com/search?q=cache:zerg.erlangonxen.org&gws_rd=cr&dcr=0&ei=nnREWvr7BMHrvgTj_KMg http://webcache.googleusercontent.com/search?q=cache:zerg.er...
- murukesh_s 9y agoCan anyone explain what does this mean? How is it different from regular VMs? Is it not booting an OS? What does it have to do with erlang?
- strmpnk 9y agoIt's a unikernel of sorts called Erlang on Zen (the VM implementation they wrote is called Ling). It does not use the BEAM runtime so you'll likely need to recompile the Erlang code but otherwise, Erlang is a simple language so I expect most things would work. Given that this was written roughly 4 years ago (guessing by some dates on the site), its not clear what their support looks like for newer features like maps might be. Performance looks good (relative to BEAM) but they are also single-threaded which means you'd need to cluster your instances to do multi-processing... and I'm not sure that'd mix well with ephemeral nodes. They talk a little more about this on their site: http://erlangonxen.org/more/clustering http://erlangonxen.org/more/clustering
- rdtsc 9y agoIt's an implementation of the Erlang VM on top of Xen. Xen is a virtualization hypervisor. Erlang VM is a virtual machine which runs Erlang bytecode. The default implementation is called BEAM and it runs on *nix, Windows and other architectures. This implementation is more lightweight and only runs on top of Xen. One of its main features is a fast boot time. So to recap instead of the typical stack of: Erlang Code | BEAM VM | Linux or other OS | VM or Hardware You get: Erlang Code | Ling | Xen | Hardware The use cases could be isolation, scaling or what authors calls 0-footprint cloud. That is, only spawn instances as you process requests. When requests are not coming, you don't have any instances running. In more modern terms maybe it could be used for building a serverless architecture used to run cloud "functions" Yes there is obvious irony here with the demo not handling requests well after the HN frontage hug of death, but I think it is still a beta / experimental product, it has been around for a good number of years and is somewhat abandoned. If anyone knows more please feel free to correct me.
- djhworld 9y agoI enjoyed your post, it made me think, could you do something similar with say the JVM? I know loading JVM based applications have horrific startup times on cold boot, but I was just wondering could you run the JVM directly on top of Xen?
- htgb 9y agoIt's definitely impressive, kinda like an own serverless implementation. However, is there a point in shutting down the VM right away, other than being a cool demo? It seems to me that you could quite easily keep it around if there are more requests queued, and quickly spawn more workers if the queue gets too long. So a regular worker pool, just that the number of workers can be adjusted relatively quickly.
- regularfry 9y agoThe point is that you don't need the added complexity of a worker pool. It's another thing to break, so why bother?
- michaelmior 9y agoEven 250ms latency to boot is significant. Especially if you're processing thousands of requests per second.
- NegativeLatency 9y agoOr if you are processing more than 4 per core per second.
- imtringued 9y agoThreads take milliseconds to start yet we still use thread pools.
- vidarh 9y agoShutting them down right away achieves a number of things, such as significantly better isolation between requests, and more protection against resource leaks. Whether that'll be worth the cost remains to be seen - 250ms is still far too long for most uses, but if it can come down enough, it's attractive.
- rwmj 9y agoI couldn't get to the site, but assuming this is running Linux I wrote a paper about how fast you could boot a Linux minimal userspace on QEMU a couple of years ago[1]. In short if you're willing to heavily customize the kernel, qemu and userspace then you can get it down to 100-150ms on i7-type hardware, but probably not much lower. Using a distro kernel, distro qemu and so on, you're stuck with 400-600ms (which is fine for certain uses, eg better security for containers like Kata Containers is doing). Also worth noting I wrote a bunch of benchmarking tools to help optimize this case[2]. [1] http://oirase.annexia.org/tmp/paper.pdf http://oirase.annexia.org/tmp/paper.pdf [2] https://github.com/libguestfs/libguestfs/tree/master/utils https://github.com/libguestfs/libguestfs/tree/master/utils
- jeswin 9y agoThe demo might be down for now, but their vision http://erlangonxen.org/case/a-personal-facebook http://erlangonxen.org/case/a-personal-facebook is something I strongly believe in. Basically, the cost of spinning VMs is coming down drastically (with Hyper.sh and Intel ClearContainers offering 200ms boot) and it is now feasible to run your apps on a personal cloud sandbox. You data resides in that box and runs code you have approved; away from the prying eyes of FB, Google and the government. Everyone's facebook will be an individually hosted app, talking to each other over agreed upon protocols; as opposed to exchanging data within the facebook infra. Of course, a lot of UX and engineering problems need to be solved along the way. Provisioning a personal sandbox cannot be any harder than creating an account on a Social Network. Beiber's sandbox will need to distribute data to 105M followers efficiently. You'll need to patch vulnerabilities at scale, so there needs to be some trust model for applying patches. You need relays to overcome censorship etc.
- amitport 9y agoA personal facebook still needs to talk with others' personal facebooks. I tried to solve this problem using derivative regular expressions as graph queries paper: http://onlinelibrary.wiley.com/doi/10.1002/spe.2226/abstract http://onlinelibrary.wiley.com/doi/10.1002/spe.2226/abstract source code: https://github.com/amitport/graphpack https://github.com/amitport/graphpack (there are other solutions, I admit this is just a plug, but it will be great if it could gain traction)
- abstractbeliefs 9y agoWhat you - and the personal facebook case - are really describing is IndieWeb, and already developing movement of home-building your social media and linking with others implementing open protocols. The main issue just now is that writing (or deploying) IndieWeb platforms and hosting them is the preserve of geeks, and it will not take off and displace current platforms until we can make it trivial for Mom and Dad to join us.
- BillinghamJ 9y agoThis was the idea behind Diaspora - https://diasporafoundation.org https://diasporafoundation.org Unsurprisingly, it is not used by “normal” non-techy people.
- voiper1 9y agoIf it's down, just hit reload a few times. I see phase A from 126.3 ms to 187ms.
- anilgulecha 9y agoThis is the future of computing/software -- pure commodity of CPU+memory. Applications that build on top of these granular interfaces will largely the next wave of successful architectures. I'm thinking of building something here for static sites as an open source project/spec. If anyone is interested in bouncing ideas on this, please ping me via email (in profile).
- dcow 9y agoI agree with your first paragraph. But why would this provide any benefit for a static site where no compute is needed (or all compute is client side)?
- anilgulecha 9y agoMy bad -- I meant static sites with one additional functionality that all static sites try to outsource: comments. (it would no longer be strictly static, but the idea is to decouple site from hosting/compute, so it would be easy to port a static/dynamic site between providers at the switch of a DNS entry).
- jesperlang 9y agois Zerg related to Ling? It seems like this project has (sadly) died out. Anyone know the current status? https://github.com/cloudozer/ling/issues/141 https://github.com/cloudozer/ling/issues/141
- jhgg 9y agoYes, Zerg is powered by Ling. If you scroll down you can see how it's involved in the request summary. A cached copy of the page is in a sibling comment
- Improvotter 9y agoWouldn't this be good for shutting down unused VMs in order to save money when renting infrastructure? Most website can go "down" during the night and when a user tries to connect to it, it would take 0.2s extra, but after that it would stay on. Now that I think of it, spiders/bots might activate it beforehand. You could use robots.txt, but not all spiders/bots seem to follow those "rules". Food for thought!
- rplnt 9y agoWhat does a website really do if it does nothing? What money does it consume? What else can you do with the machine it's on? Wouldn't moving VMs around accomplish the same goal? Sidenote: some customers might use monitoring :)
- JoeAltmaier 9y agoCloud providers charge for time VMs are active. So it saves money to de-commission them when idle.
- eat_veggies 9y agoHeroku actually does this for their free instances. They "sleep" servers after iirc 30 minutes of inactivity, and they wake up again after the first request, which takes a few seconds longer as it boots up.
- trevorriles 9y agoHow would this compare to mirageos? It sounds similar to a project called Jitsu. http://www.skjegstad.com/blog/2015/03/25/mirageos-vm-per-url-experiment/ http://www.skjegstad.com/blog/2015/03/25/mirageos-vm-per-url...
- trevorriles 9y agoThis post is actually more relevant. http://www.skjegstad.com/blog/2015/08/17/jitsu-v02/ http://www.skjegstad.com/blog/2015/08/17/jitsu-v02/
- deleted 9y ago[deleted]
- vog 9y agoThis is a very interesting development! But doesn't that mean we are merely reimplementing old concepts on a new level? Almost everything we do on VM level we already did on process level: - Read-only VM images are essentially like statically linked binaries, just better encapsulated when they run. - Tiny, fast loading VM images are essentially stripped static binaries with dead code elimination. - Starting those by incoming network request is just like old "inetd" versions started custom handler programs on each request. - Same with CGI, just on HTTP rather than TCP level. - Manual maintaining the lifecycle of those VMs like FastCGI in nginx. - Maintaining the lifecycle of such a started VM is essentially like FastCGI in Apache (or nginx + auto-spawner). The only real difference is the improved encapsulation (controlled network access and resource consumption) of the running code, isn't it? What might come next? - Multiple VMs could share the same images to save memory, essentially reinventing shared libraries and dynamic linking. - Network traffic into and out of a VM is controlled more tightly, reinventing SELinux. (Perhaps followed by noticing that these profiles are hard to maintain, rediscovering the maintenance issues of SELinux systems.) - Providing the network traffic shape directly with the image, so these can be maintained at a single place, by the original developers. This would reinvent Pledge. - Introducing permissions for network traffic, e.g. such that just one group of application VMs can communicate with the database VMs. Ideally with an ACL system as used for managing file permissions. This would reinvent Unix Sockets.
- catern 9y agoYes, all this "container per request" or "unikernel per request" stuff is essentially the same as what everyone was doing 20 years ago with basic CGI. But this stuff also has far worse performance than CGI's "process per request", since processes can be started very fast, in microseconds. It would be more interesting if we just made more sandboxing powers available for traditional processes, though there is already quite a lot of sandboxing available for Linux processes...
- anilgulecha 9y ago> made more sandboxing powers available for traditional processes You just described containers :)