Containers and serverless functions - a modern architecture needs both and more

When we talk containers and serverless, I'm conscious that we live in a fashion-driven technology world. But given the pace of both development and adoption is it a binary choice for the enterprise developer?

Fads are the reason technologies hit the peak of a hype cycle before crashing into a sea of cynicism, but they are merely a manifestation of the bandwagon effect, a form of groupthink that many struggle to resist. Right now, the bandwagon for software containerization is standing room only. But as I discussed when outlining the objectives of the cloud-native Computing Foundation (CNCF) it's a mistake to see containers as a panacea to IT's operational ills.

While containers are a more efficient and flexible alternative to VMs, they are but one element of a comprehensive cloud-native application and infrastructure design. A recent survey (PDF) shows that a sizable number of cloud developers and operations teams have come to the same conclusion.

Containers are the new VMs

As I have noted many times over the past year, containers have rapidly gone mainstream and become a viable enterprise alternative to VMs. The CF poll characterizes containers as having “crossed the chasm,” with 72 percent of respondents using or evaluating the technology, up 19 points in two years.

The poll doesn’t expose the reasons for container adoption, but as I have detailed many times, most recently in discussing VMware’s entry into the container-as-a-service (CaaS) business, it is likely a combination of efficient use of system resources and the ability to automatically manage workload deployments across scalable clusters using software like Kubernetes.

While the container results in Cloud Foundry’s survey are predictable, the usage numbers for two other cloud-related technologies, PaaS and serverless, are much more interesting. The same poll finds that 77 percent are using or evaluating PaaS, with actual usage up 16 points in two years, with 28 percent describing their deployment as “broad.”

While it’s unclear whether cost savings are the primary motivation for PaaS adoption, 62 percent of IT leaders (presumably a subset that omits developers and operations people) cite saving at least $100,000 by using PaaS instead of traditional development techniques. One would expect PaaS to be popular in a Cloud Foundry poll. However, I believe the numbers are less indicative of Cloud Foundry’s strength and more a function of organizations move to higher levels of service abstraction and striving for higher speed and efficiency when developing cloud-native apps. For details, see my previous column on the arguments for PaaS.

Serverless is the fashionable new technology

Serverless hasn’t achieved the same degree of adoption as containers and PaaS, but is on the same path, just slightly delayed. The survey finds that 46 percent are using or evaluating serverless, with the level of evaluation up 10 points in a year. The CF analysis notes that (emphasis added),

The level of interest in evaluating serverless computing is comparable to where evaluation stood for containers in early 2016. Our tracking data of containers suggests a drop in “not using” is a leading indicator for crossing the chasm, as non-users first become evaluators and then users. It stands to reason that the same pattern will manifest itself with serverless.

Most significant is the fact that 39 percent of survey respondents are using all three technologies: containers, PaaS and serverless. Likewise, half of all respondents are using or evaluating cloud-native architectures, with nearly as many adopting microservices. Unfortunately, these terms are squishy, something the Cloud Foundry survey authors admit, writing,

Given that some of these terms’ definitions overlap or, at the very least, are understood to be similar, these results suggest the way about which certain technologies are spoken reaches market demands differently.

Nevertheless, the results indicate that various constituencies across organizations large and small have developed a deeper appreciation for the many components that make up a modern, cloud-native application and its associated infrastructure. Indeed, another poll from New Relic finds that what it calls dynamic cloud users, namely those with the most advanced understanding and expansive use of the technology,

Do not view their investments in the cloud as standalone technologies, but as yet another tool in their kit. Many of these organizations are combining their cloud investments with other emerging technologies that facilitate more dynamic allocation of resources.

While it doesn't specify these other technologies, they presumably include things like automated DevOps processes using infrastructure-as-code and CI/CD (continuous integration and delivery) automation, machine and deep learning along with distributed data analytics services.

The Cloud Foundry results must be taken with a grain of salt, since like every sponsored poll, there’s an agenda driving reported outcomes. The sample is drawn from “a global survey of IT Decision Makers” spanning developers, IT operations and various management roles that had been “screened based on self-reported IT knowledge.”

It’s unclear the degree of selection bias here and what percentage of the respondents have adopted the Cloud Foundry PaaS and likely gone through the training-cum-brainwashing program that CF acolytes call a Dojo. Nevertheless, it’s safe to assume the responses aren’t representative of IT writ large, but of the type of tech-savvy organizations that are developing cloud-native applications and thus drawn to a PaaS like Cloud Foundry. Still, the results are instructive since they show the direction cloud pioneers are heading.

Serverless has its limits

Whether you call it a peak of inflated expectations or irrational exuberance, every technology goes through an early stage of euphoria and hyperbole which generally ends with it being declared the successor to and the death knell for prior technologies in the same category. This ethos of destructive technology is nicely summarized in this satirical Tweet from fellow analyst Kelsey Hightower,

Serverless will surely take over in the next few years, including more specific serverless offerings like serverless databases, serverless streaming services and others. For us developers, this is almost the holy grail. Build it, ship it, it works.

Back in the real world, enterprise users see serverless as a powerful technology for gluing modules together and handling asynchronous events without dedicating a server or instance to the task. According to a survey from PureSec, a serverless security vendor (emphasis added)

Almost two-thirds (65%) of companies said they used serverless for cloud automation tasks that might previously have been handled by scripts, while 45% said they deployed serverless as the back-end for running web sites. Other popular uses included data processing (38%) and as providing back-end services for mobile applications (35%).

Right now, it seems, lightweight functions written using scripting languages that execute in a few hundred milliseconds are far more common than larger, long-running functions; the median duration of monitored functions is just 510 milliseconds. As more people gain familiarity with serverless architectures by running experiments and prototyping, however, we expect to see an increase in the number of functions per account and greater overall function complexity.

In sum, serverless, aka functions-as-a-service, are incredibly useful for linking modules provided by containers, VMs (instances) and other cloud services in composite or microservices-based application. However, the notion that you'll be someday running an organization's ERP system on an entirely serverless platform is folly.

My take

As I mentioned in my column on the CNCF, an obsession with containers as the be-all environment agnostic cloud platform is short-sighted since I believe that users derive greater value from the cloud when moving up the stack to consume higher level services.

While containers are a valuable platform for running custom applications, I believe their importance to enterprises will wane over time as organizations gain expertise with cloud services and shift from being application operators to consumers, letting the cloud vendors build and run the services.

PaaS and serverless both facilitate the shift to cloud service consumption: PaaS by acting as a structured, efficient environment for creating applications that access services and serverless by being the glue that binds cloud services and custom modules into a cohesive system.

While I agree with Cloud Foundry’s conclusion that “it’s a multi-platform world”, I contend that its triune structure needs at least one more piece: the growing portfolio of application, data, AI and automation cloud services from AWS, Azure, Google Cloud and others that obviate the need to operate one’s own systems.