Hacker News new | ask | show | jobs
by PanMan 4392 days ago
I know Google runs at a huge scale, but isn't even for them 2 billion containers / week a LOT? I assume a lot of these only run for a really short time? Are containers the new scripts?
3 comments

I can't give specifics but a lot of these are short lived. For example, if you launch a MapReduce it'll typically launch containers for each of the workers and then take them down when the MR is done.

This also doesn't speak to the number of long running containers. There are plenty that don't stop/start during the week I grabbed that number.

If docker images are fancy static binaries, then docker containers are fancy OS processes. Going through two billion OS PIDs in a week doesn't seem that hard.
Still seems like a lot, 2 billion a week is over 3300 every second. Says a lot about the scale at which Google operates.
_The Datacenter as a Computer_ [1] is a free book written by Googlers that helps get your head around that scale.

[1] http://www.morganclaypool.com/doi/abs/10.2200/S00516ED2V01Y2...

> Are containers the new scripts?

They certainly seem to work well for that. Heroku, for example, uses containers for not just persistent processes (application servers, workers) but also short-lived processes. Tasks that run on a schedule (hourly, daily, etc.) are run by, you guessed it, starting up a container running a processes which exits when it's finished. One-off commands like maintenance scripts or REPLs work the same way.