300 sec

is how long it takes to launch a Linux instance to availability on Amazon EC2.

50 sec

is the time between power on and the lock screen for an Android phone.

0.2 sec

ago is when we received your request. Within this time we managed to create a new Xen instance, boot it, and run the application that rendered the page you are viewing. By the time you are done reading this, the instance will be gone.

Details for technically inclined

The breakdown of what happened during the request processing:

Phase Duration Notes
A 112.7 ms An HTTP GET request received by nginx. The request is temporarily forwarded to the 'spawner' application. The spawner asks Xen via libvirt daemon to launch a new instance. The new instance gets created and is ready to boot.
B 2.0 ms The LING VM starts to execute. It performs all preparatory steps needed to run Erlang code. Control reaches the main emulator loop. Erlang code starts to run.
C 120.0 ms init:boot() is entered and the standard Erlang boot sequence is performed. Many standard servers, such as code_server and application_master, are started. The boot sequence concludes with the launch of 'zergling_app' application as requested by a command line flag.
D 1.2 ms zergling_app:start() is entered. A cowboy webserver is asked to listen for incoming requests on port 8000.
E 0.8 ms The spawner is notified that the new instance is ready to process web requests.
F 1.2 ms The spawner replies to nginx with X-Accel-Redirect header citing the location of the instance. nginx proxies the original client connection to the new instance.
G ? After rendering the page you are viewing the instance immediately shuts itself down. The spawner recongnises that the instance has gone away and notes that its IP address may be reused.

The command line received by the instance:

[{root,["/erlang"]},
 {ipaddr,["10.139.42.192"]},
 {netmask,["255.0.0.0"]},
 {gateway,["10.0.0.1"]},
 {notify,["10.0.0.1:8909"]},
 {shutdown_after,["15000"]},
 {home,["/zergling"]},
 {pz,["/zergling/ebin"]},
 {pz,["/zergling/deps/cowboy/ebin"]},
 {pz,["/zergling/deps/cowlib/ebin"]},
 {pz,["/zergling/deps/ranch/ebin"]},
 {pz,["/zergling/deps/erlydtl/ebin"]},
 {ts_req_received,["1500719524.698021"]}]