News for hackers. Stuff that matters.
Re:Zerg demo – Xen instance spawned for each web request by jeremyjh on Tuesday February 19, 2013 @10:39AM (#5244798)
This is really neat stuff. I do not understand though why LING is not open-source already. If you are sincere in your claims for intentions of making it so, why would you wait until it is "mature" before doing so? Wouldn't it mature a lot faster if more people picked it up and tried to use it, submitted defects and even patches?
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @11:35AM (#5245180)
I'm afraid, only few people are familiar with internals of Erlang VM, especially, if that VM is totally different from BEAM. Thus, there's no reason to opensource it, at least yet. Though, build.erlangonxen.org is open, contains the most recent stable version, and free to use.
Re:Zerg demo – Xen instance spawned for each web request by steeve on Tuesday February 19, 2013 @06:06AM (#5243678)
You know, the idea sure is impressive, but getting over capacity errors sure doesn't show it well :)
Re:Zerg demo – Xen instance spawned for each web request by thu on Tuesday February 19, 2013 @07:15AM (#5243871)
On the contrary I like it. They have finite resources and it answers immediately with the correct response.
Re:Zerg demo – Xen instance spawned for each web request by St-Clock on Tuesday February 19, 2013 @09:59AM (#5244580)
This. With typical web applications, your request would wait until something times out and cascades back to the client (webserver, app server, db, etc.). This can mean waiting for 30 seconds or more depending on your configuration.

It's not an easy problem to solve elegantly too.

Re:Zerg demo – Xen instance spawned for each web request by pixelbath on Tuesday February 19, 2013 @11:57AM (#5245374)
It actually is quite easy if you set a finite limit on connections and show an appropriate message to those connections you're actively refusing. If you're allowing as many connections as your server/network/database can allow, it might take a bit longer to determine a failure status.
Re:Zerg demo – Xen instance spawned for each web request by thu on Tuesday February 19, 2013 @05:11AM (#5243546)
The demo about the vm+server startup time is interesting, but I am glad to know about the way they use Nginx to proxy the request twice to do the provisioning of the vm+server.

Edit: I wonder if the numbers would be similar if the example was done with HaLVM (https://github.com/GaloisInc/HaLVM).

Re:Zerg demo – Xen instance spawned for each web request by piranha on Tuesday February 19, 2013 @05:31AM (#5243595)
Application which handles original request (called 'spawner') asks Xen to start a new server, and when Xen reports back, returns 'X-Accel-Redirect' to nginx, which then nginx serves.
Re:Zerg demo – Xen instance spawned for each web request by Groxx on Tuesday February 19, 2013 @12:41PM (#5245711)
For people who are interested but unable to get a connection, here's a saved page: http://f.cl.ly/items/07293W450C3F0r472u1O/Zerg%20demo%20-%20...

I tweaked the background image URLs so they'd be absolute instead of relative, but otherwise it's unmodified.

Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @02:44PM (#5246577)
Thanks. We used libvirt for this demo, unfortunately it sets its own limits.
Re:Zerg demo – Xen instance spawned for each web request by icoder on Tuesday February 19, 2013 @04:04AM (#5243380)
I'm seeing 1.5 to 1.6 secs. Is that due to my crappy internet connection or is that simply what it is?

Because 1.5 secs per request, and more for somewhat more complex operations, seems long to me. As instance startup time it is impressive though! But they are designed to die after each request, right? Or is that just this example?

Re:Zerg demo – Xen instance spawned for each web request by nkozyra on Tuesday February 19, 2013 @07:55AM (#5243984)
I got 3 seconds.

But that isn't 3 seconds to serve the page. That's 3 seconds to basically build and boot the "server" on-demand, start all necessary daemons and serve the page.

Now think about what happened when you needed to add a Web server 10 years ago.

Re:Zerg demo – Xen instance spawned for each web request by thu on Tuesday February 19, 2013 @05:10AM (#5243541)
It is just an example to show how quickly they can provision a new vm+server. They are not advocating for it to be a good way to serve requests.
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:22AM (#5243575)
libvirt is the limit in this case...
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @04:13AM (#5243398)
Right, it's just example, right, it dies after each request - you can check the code on github. Also, you can review the detailed structure of time spending on the second half of zerg's page.
Re:Zerg demo – Xen instance spawned for each web request by pyvpx on Tuesday February 19, 2013 @05:23AM (#5243578)
one thing I haven't been able to wrap my head around is why "on xen"? couldn't this be done "on qemu" as well, or even 'more betterly'?
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:47AM (#5243634)
Current implementation runs in Xen PV domain and uses Xen's hypercalls. There are no strong dependencies, though, Ling easily can be ported for other hypervisors. Xen is the priority, since it's the plaform for all major public clouds.
Re:Zerg demo – Xen instance spawned for each web request by borplk on Tuesday February 19, 2013 @04:58AM (#5243514)
Can someone shine some light on why and how this is useful? What are some examples?
Re:Zerg demo – Xen instance spawned for each web request by nkozyra on Tuesday February 19, 2013 @07:53AM (#5243975)
If you've ever had to scale capacity on AWS (or any other on-demand cloud service, really) you'd know. On the page they say 300 seconds to bring up a Linux instance, but really that can even take longer from time to time.

When you need to scale in a hurry (or in this case semi-automatically), the ability to launch persistent or temporary VM instances in a much shorter timeframe is critical.

Granted (and as they note here) this is sort of demo-only, and probably not particularly useful out of the box. But as a demonstration of how fast things could work it's perfect. It doesn't hurt that it's functional.

Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:22AM (#5243572)
Scalable MapReduce, for example, super scalable web servers tolerant for any possible spikes of load, including abuse-resistant hostings, personal virtual appliances... there are many possible usecases, indeed
Re:Zerg demo – Xen instance spawned for each web request by otoburb on Tuesday February 19, 2013 @11:26AM (#5245110)
The folks at ZeroVM have a list of motivations[1] for this type of execution and hosting model. The only problem is that it's hard to tell how active the project is from their main page alone.

EDIT: Their github commit is fairly active for a solo developer[2].

[1] http://zerovm.org/motivation/

[2] https://github.com/zerovm/zerovm/commits/master

Re:Zerg demo – Xen instance spawned for each web request by camuel on Tuesday February 19, 2013 @10:02PM (#5248711)
we are heads down coding and haven't got time yet to update ZeroVM website. If you want to contribute contact us now please, if you to use ZeroVM hypervisor stay tuned...
Re:Zerg demo – Xen instance spawned for each web request by jonny_eh on Tuesday February 19, 2013 @05:00AM (#5243519)
So what's being shown off here? Clearly it's impressive that a web server VM is loaded so quickly, but what's the key? Is it a carefully configured Xen VM? Or is it the use of Erlang?
Re:Zerg demo – Xen instance spawned for each web request by asabil on Tuesday February 19, 2013 @05:12AM (#5243549)
This is an OS-less web server VM, basically an modified Erlang VM to run directly on "almost" bare-metal
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:18AM (#5243567)
Actually, we didn't modify Ericsson's Erlang VM, we have written our own.
Re:Zerg demo – Xen instance spawned for each web request by thepumpkin1979 on Tuesday February 19, 2013 @05:23AM (#5243577)
Impressive, is that what Zerg is about? where can I find more information about this?
Re:Zerg demo – Xen instance spawned for each web request by Zolomon on Tuesday February 19, 2013 @05:35AM (#5243608)
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:44AM (#5243622)
Zerg is just a demo that shows how elastic and scalable could be OSless VMs even over current cloud infrastructure
Re:Zerg demo – Xen instance spawned for each web request by 7952 on Tuesday February 19, 2013 @12:37PM (#5245682)
If you run Perl in CGI it creates a new VM for every single request. How is this different?
Re:Zerg demo – Xen instance spawned for each web request by lucaspiller on Tuesday February 19, 2013 @01:30PM (#5246062)
See http://erlangonxen.org/. This means VM in terms of an AWS instance :)
Re:Zerg demo – Xen instance spawned for each web request by csense on Wednesday February 20, 2013 @01:16AM (#5249244)
CGI creates a new OS process for every request. Zerg creates a new Xen VM for every request.

These are very different things.

Re:Zerg demo – Xen instance spawned for each web request by thepumpkin1979 on Tuesday February 19, 2013 @04:59AM (#5243517)
It keeps saying "Over capacity", I want to know what this is about though.
Re:Zerg demo – Xen instance spawned for each web request by ghayes on Tuesday February 19, 2013 @05:03AM (#5243529)
About being able to quickly scale to capacity. :)
Re:Zerg demo – Xen instance spawned for each web request by viktorsovietov on Tuesday February 19, 2013 @05:19AM (#5243569)
Sorry, gents, we don't have real datacenter there, just a single host, and libvirt sets its own limitations.
Re:Zerg demo – Xen instance spawned for each web request by gosukiwi on Tuesday February 19, 2013 @06:50AM (#5243807)
zerg rush is imba (get the joke? ha... sorry)
Re:Zerg demo – Xen instance spawned for each web request by mattbeck on Tuesday February 19, 2013 @01:45PM (#5246190)
Borked.