
Zerg demo – Xen instance spawned for each web request - k33l0r
http://zerg.erlangonxen.org/
======
jeremyjh
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?

~~~
viktorsovietov
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.

------
steeve
You know, the idea sure is impressive, but getting over capacity errors sure
doesn't show it well :)

~~~
thu
On the contrary I like it. They have finite resources and it answers
immediately with the correct response.

~~~
St-Clock
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.

~~~
pixelbath
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.

------
thu
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>).

~~~
piranha
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.

------
Groxx
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...](http://f.cl.ly/items/07293W450C3F0r472u1O/Zerg%20demo%20-%20spawned%20for%20each%20web%20request.html)

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

~~~
viktorsovietov
Thanks. We used libvirt for this demo, unfortunately it sets its own limits.

------
icoder
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?

~~~
thu
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.

~~~
viktorsovietov
libvirt is the limit in this case...

------
pyvpx
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'?

~~~
viktorsovietov
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.

------
borplk
Can someone shine some light on why and how this is useful? What are some
examples?

~~~
otoburb
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>

~~~
camuel
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...

------
jonny_eh
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?

~~~
asabil
This is an OS-less web server VM, basically an modified Erlang VM to run
directly on "almost" bare-metal

~~~
viktorsovietov
Actually, we didn't modify Ericsson's Erlang VM, we have written our own.

~~~
thepumpkin1979
Impressive, is that what Zerg is about? where can I find more information
about this?

~~~
Zolomon
<http://en.wikipedia.org/wiki/Zergling#Zerg> or

<http://knowyourmeme.com/memes/zerg-rush>

~~~
viktorsovietov
Zerg is just a demo that shows how elastic and scalable could be OSless VMs
even over current cloud infrastructure

------
7952
If you run Perl in CGI it creates a new VM for every single request. How is
this different?

~~~
csense
CGI creates a new _OS process_ for every request. Zerg creates a new _Xen VM_
for every request.

These are very different things.

------
thepumpkin1979
It keeps saying "Over capacity", I want to know what this is about though.

~~~
ghayes
About being able to quickly scale to capacity. :)

~~~
viktorsovietov
Sorry, gents, we don't have real datacenter there, just a single host, and
libvirt sets its own limitations.

------
gosukiwi
zerg rush is imba (get the joke? ha... sorry)

------
mattbeck
Borked.

