Google: 'EVERYTHING at Google runs in a container'

Ad giant lifts curtain on how it uses virtualization's successor TWO BILLION TIMES A WEEK

Google is now running "everything" in its mammoth cloud on top of a potential open source successor to virtualization, paving the way for other companies to do the same.

Should VMware be worried? Probably not, but the tech pioneered by Google is making inroads into a certain class of technically sophisticated companies.

That tech is called Linux Containerization, and is the latest in a long line of innovations meant to make it easier to package up applications and sling them around data centers. It's not a new approach – see Solaris Zones, BSD Jails, Parallels, and so on – but Google has managed to popularize it enough that a small cottage industry is forming around it.

Google's involvement in the tech is significant because of the mind-boggling scale at which the search and ad giant operates, which in turn benefits the tech by stress-testing it.

"Everything at Google runs in a container," Joe Beda, a senior staff software engineer at Google, explained in some slides shown at the Gluecon conference this week. "We start over two billion containers per week."

Two billion containers a week [Two BEEELLION!?—Ed.] means that for every second of every minute of every hour of every day, Google is firing up on average some 3,300 containers. It's probably started over 40,000 since you began reading this article.

The company is able to do this because of how the tech works: Linux containerization is a way of sharing parts of a single operating system among multiple isolated applications, as opposed to virtualization which will support multiple apps with their own OS on top of a single hypervisor.

This means that where it can take minutes to spin up a virtual machine, it can take seconds to start a container because you aren't having to fire up the OS as well.

This is beneficial for massive distributed applications with lots of discrete parts that need to be summoned, run, and then killed in short order. It's also much more efficient from a CPU utilization perspective, which matters if you're an IT-focused organization like Google.

The main tradeoff with the approach is in security, because if someone can break out of a container and modify the underlying Linux OS, they can own all other containers on the system, whereas virtualization prevents this type of contamination.


Google began its journey into containerization in the mid-2000s when some engineers donated a tech named cgroups into the Linux kernel. This technology "provides a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour."

In the same way Google's publication of the MapReduce and GFS papers let Yahoo! engineers create open source data analysis framework Hadoop, the addition of cgroups let to further innovations by other companies.

The kernel feature cgroups became a crucial component of LXC, LinuX Containers, which combines cgroups with network namespaces to make it easy to create containers and the ways they need to connect with other infrastructure. While useful, this still required sophisticated users.

That is, until startup Docker came along.

"The technology was not accessible/useful for developers, containers were not portable between different environments, and there was no ecosystem or set of standard containers," explains Docker's chief executive Ben Golub in an email to The Register.

"Docker's initial innovation was to address these issues," he writes, "by providing standard APIs that made containers easy to use, creating a way for the community to collaborate around libraries of containers, working to make the same container portable across all environments, and encouraging an ecosystem of tools."

Docker's approach has been remarkably successful and has led to partnerships with companies like Red Hat, the arrival of Docker containers on Amazon's cloud, and integration with open source data analysis project Hadoop.

Google's take on containerization is slightly different, as it places more emphasis on performance and less on ease of use. To try to help developers understand the difference, Google has developed a variant of LXC named, charmingly, lmctfy, short for Let Me Contain That For You.

Google describes lmctfy as "the open source version of Google's container stack, which provides Linux application containers. These containers allow for the isolation of resources used by multiple applications running on a single machine. This gives the applications the impression of running exclusively on a machine. The applications may be container-aware and thus be able to create and manage their own subcontainers," the company explains on its Github page.

"The project aims to provide the container abstraction through a high-level API built around user intent," Google writes. "The containers created are themselves container-aware within the hierarchy and can be delegated to be managed by other user agents.

For its part, Docker isn't threatened by lmctfy, and plans to run it as an optional execution engine within the Docker software.

"Docker initially provided the APIs and standardization on top of LXC tools," Golub told us. "With the release of 0.9, we added the ability to have swappable execution environments, so that we can now put docker around LXC, libvirt, libcontainer, systemd/nspawn, and other lower-level container formats. Work is happening to support LMCTFY as an execution engine under Docker (Google's open source format), and some interesting work is even being done to wrap Docker around Zones, Jails, and Parallels."

Google has also offered an olive branch to Docker by adding in support for Docker containers on its "Google Cloud Platform" in recognition of the enthusiasm with which the tech has been adopted.

With Docker's inaugural conference a few weeks away and Google's Eric Brewer slated to give a keynote, we'll be sure to bring you more information about how these two approaches to the same technology develop, intertwine, and better the lives of developers.

Do you use containerization in your business, and if so, what does it do for you? ®

Broader topics

Other stories you might like

  • DigitalOcean sets sail for serverless seas with Functions feature
    Might be something for those who find AWS, Azure, GCP overly complex

    DigitalOcean dipped its toes in the serverless seas Tuesday with the launch of a Functions service it's positioning as a developer-friendly alternative to Amazon Web Services Lambda, Microsoft Azure Functions, and Google Cloud Functions.

    The platform enables developers to deploy blocks or snippets of code without concern for the underlying infrastructure, hence the name serverless. However, according to DigitalOcean Chief Product Officer Gabe Monroy, most serverless platforms are challenging to use and require developers to rewrite their apps for the new architecture. The ultimate goal being to structure, or restructure, an application into bits of code that only run when events occur, without having to provision servers and stand up and leave running a full stack.

    "Competing solutions are not doing a great job at meeting developers where they are with workloads that are already running today," Monroy told The Register.

    Continue reading
  • Patch now: Zoom chat messages can infect PCs, Macs, phones with malware
    Google Project Zero blows lid off bug involving that old chestnut: XML parsing

    Zoom has fixed a security flaw in its video-conferencing software that a miscreant could exploit with chat messages to potentially execute malicious code on a victim's device.

    The bug, tracked as CVE-2022-22787, received a CVSS severity score of 5.9 out of 10, making it a medium-severity vulnerability. It affects Zoom Client for Meetings running on Android, iOS, Linux, macOS and Windows systems before version 5.10.0, and users should download the latest version of the software to protect against this arbitrary remote-code-execution vulnerability.

    The upshot is that someone who can send you chat messages could cause your vulnerable Zoom client app to install malicious code, such as malware and spyware, from an arbitrary server. Exploiting this is a bit involved, so crooks may not jump on it, but you should still update your app.

    Continue reading
  • Google says it would release its photorealistic DALL-E 2 rival – but this AI is too prejudiced for you to use
    It has this weird habit of drawing stereotyped White people, team admit

    DALL·E 2 may have to cede its throne as the most impressive image-generating AI to Google, which has revealed its own text-to-image model called Imagen.

    Like OpenAI's DALL·E 2, Google's system outputs images of stuff based on written prompts from users. Ask it for a vulture flying off with a laptop in its claws and you'll perhaps get just that, all generated on the fly.

    A quick glance at Imagen's website shows off some of the pictures it's created (and Google has carefully curated), such as a blue jay perched on a pile of macarons, a robot couple enjoying wine in front of the Eiffel Tower, or Imagen's own name sprouting from a book. According to the team, "human raters exceedingly prefer Imagen over all other models in both image-text alignment and image fidelity," but they would say that, wouldn't they.

    Continue reading
  • Facebook opens political ad data vaults to researchers
    Facebook builds FORT to protect against onslaught of regulation, investigation

    Meta's ad transparency tools will soon reveal another treasure trove of data: advertiser targeting choices for political, election-related, and social issue spots.

    Meta said it plans to add the targeting data into its Facebook Open Research and Transparency (FORT) environment for academic researchers at the end of May.

    The move comes a day after Meta's reputation as a bad data custodian resurfaced with news of a lawsuit filed in Washington DC against CEO Mark Zuckerberg. Yesterday's filing alleges Zuckerberg built a company culture of mishandling data, leading directly to the Cambridge Analytica scandal. The suit seeks to hold Zuckerberg responsible for the incident, which saw millions of users' data harvested and used to influence the 2020 US presidential election.

    Continue reading
  • Toyota cuts vehicle production over global chip shortage
    Just as Samsung pledges to invest $360b to shore up next-gen industries

    Toyota is to slash global production of motor vehicles due to the semiconductor shortage. The news comes as Samsung pledges to invest about $360 billion over the next five years to bolster chip production, along with other strategic sectors.

    In a statement, Toyota said it has had to lower the production schedule by tens of thousands of units globally from the numbers it provided to suppliers at the beginning of the year.

    "The shortage of semiconductors, spread of COVID-19 and other factors are making it difficult to look ahead, but we will continue to make every effort possible to deliver as many vehicles to our customers at the earliest date," the company said.

    Continue reading

Biting the hand that feeds IT © 1998–2022