Over the past decade, the enterprise has made a move from the data center to the cloud. This move provided challenges, opportunities, and hard-won lessons learned. The story of the cloud is a story of the evolution of computing – the transformation that hardware, software, and architecture has undergone.
The background leading to serverless
Physical servers, racked and mounted in your data center, used to be the only way to run software on a large scale. These physical servers ran a specific operating system and application that met usage demands. Provisioned resources were proportional to the peak demand — not regular demand. Overprovisioned servers were necessary to remain reliable under load. These resulted in wasted time and money operating at capacities many times over the norm.
With the advent of virtualization, a single physical server could run many applications. But the same underlying, hardware-driven limitations remained. Enterprises still needed to manage enough capacity to meet peak demands. Enterprises still needed to manage operating systems, security updates, and software integrations. Enterprises still needed to house, power, climate control, and secure the physical servers.
Moving to the cloud freed the enterprise from the limitations of physical servers. Actions like scaling became exercises in configuration and not hardware procurement. Embracing the cloud was an enormous step toward operational efficiency and agility.
As enterprise computing evolved, hardware became virtual and then invisible. Focus turned to abstract away the operating system, security patching, and integrations. Software and services by cloud providers, such as Amazon Web Services (AWS), made the infrastructure necessary to build complex solutions an afterthought. Enterprises can now focus on delivering value instead of delivering infrastructure.
In a nutshell, what is serverless?
Serverless is building solutions that cut infrastructure management and maximize innovation. Serverless eliminates managing servers and the costs incurred operating them. Instead of provisioning and managing resources yourself, cloud providers perform those tasks. Cloud services like AWS Lambda only charge for resources consumed — you do not pay for idle time.
After offloading server responsibilities to AWS, what's left for your developers to do? They can focus on building solutions that maximize your differentiators.
Example business case that benefits from serverless
Suppose a medical device manufacturer receives orders from a hospital throughout the day. Each night, the manufacturer generates reports comparing order quantities against current inventory. These reports allow the manufacturer to anticipate what items need manufacturing. Additionally, the report includes a list of raw materials required and recommends factories that reduce shipping time and costs.
A traditional app architecture may look like this:
A serverless approach to the application looks like the following:
The applications perform the same tasks and meet the same business outcomes. The critical difference is in "how?" and "how much does it cost?" These questions and their answers illustrate how the two approaches are quite different.
In traditional application architectures, a server waits for requests to process. As orders come in, the app runs through the fulfillment and reconciliation process. A centralized database stores the transaction details. The entire process might take a fraction of a second to complete. The app and database servers, built to handle peak traffic loads, spend the majority of the time idle — incurring cost but not performing work.
A serverless architecture differs from this architecture in two ways. First, the app and database servers do not need provisioned hardware to host and run them. Second, they do not need to remain running when they are not performing work. This architecture shifts the costs incurred to the execution time of the nightly job.
At the core of serverless applications: Functions as a Service
A cloud application consists of four building blocks: compute, data, network, and governance. AWS Lambda falls within the computing cloud services. Lambda provides the ability to execute code in a scalable, cost-effective manner. Code, packaged as individual functions, runs in "compute containers". These functions are very short-lived, measured in, and charged by milliseconds. These functions get created and destroyed based on your runtime needs. And since AWS manages operations and maintenance, you do not need a huge team to scale your solution.
How does a business reap the benefits of serverless?
Amongst the many AWS services that compose the four main building blocks of the cloud, you will find many that are serverless. Let's focus on Lambda and how it can be a vital part of a serverless solution.
Main traits of AWS Lambda include:
· Event-driven — Do work on demand and as necessary to respond to your business needs.
· Continuous scale — Size your workloads to your needs with the ability to scale both up and down.
· Pay by usage — Manage your cloud spend and invest in innovation, not operations.
These traits benefit your business by managing scale/growth needs and costs. The best part? Services like AWS Lambda enable you to focus on building your business instead of running it.