Search code examples
azurecloudterminology

What is a difference between elastic computing and serverless computing?


I try to find out that is a difference between those two for AZ-900 exam. I found two webpages:

Elastic computing is the ability to quickly expand or decrease computer processing, memory, and storage resources to meet changing demands without worrying about capacity planning and engineering for peak usage. Typically controlled by system monitoring tools, elastic computing matches the amount of resources allocated to the amount of resources actually needed without disrupting operations. With cloud elasticity, a company avoids paying for unused capacity or idle resources and doesn’t have to worry about investing in the purchase or maintenance of additional resources and equipment. While security and limited control are concerns to take into account when considering elastic cloud computing, it has many benefits. Elastic computing is more efficient than your typical IT infrastructure, is typically automated so it doesn’t have to rely on human administrators around the clock, and offers continuous availability of services by avoiding unnecessary slowdowns or service interruptions.

https://azure.microsoft.com/en-us/overview/what-is-elastic-computing/

Serverless computing enables developers to build applications faster by eliminating the need for them to manage infrastructure. With serverless applications, the cloud service provider automatically provisions, scales, and manages the infrastructure required to run the code. In understanding the definition of serverless computing, it’s important to note that servers are still running the code. The serverless name comes from the fact that the tasks associated with infrastructure provisioning and management are invisible to the developer. This approach enables developers to increase their focus on the business logic and deliver more value to the core of the business. Serverless computing helps teams increase their productivity and bring products to market faster, and it allows organizations to better optimize resources and stay focused on innovation.

https://azure.microsoft.com/en-us/overview/serverless-computing/

For me, it's the same. As a developer, I don't have to care about infrastructure. It autoscales. Let's say that I have a web app with only one REST endpoint which does some hard calculations only. This endpoint is used heavily.

My understanding is that the only difference is cost somehow. In elastic I pay for resources: processing, memory, etc. but in serverless I pay for the done calculation?

In elastic it extends CPU to calculate it and I have to pay extra for extra CPU, but in serverless I just paid for each done calcuation and I don't care how many extra CPU it took. If so, how am I supposed to know how much will cost me serveless calculation?

Or is it all about that in elastic I have to create VM and so on, and in serverless I just deploy an app?


Solution

  • Elastic computing is the ability to quickly expand or decrease computer processing, memory, and storage resources to meet changing demands without worrying about capacity planning and engineering for peak usage.

    So, based on the workload the available resources can be expaned/reduced. Examples are Web Apps with autoscaling, Service Fabric, Azure VM Scaleset and AKS autoscaling for example. Azure Functions is a serverless offering that also offers elasticity, with the additional benefit of not having to worry about the underlying infrastructure. So you could describe serverless as elastic computing with benefits.

    But it all depends on your workloads. Azure Functions have a max runtime of 10 minutes and is best for workloads that respond to events (triggers) but I can imagine that some workloads like webshops cannot be build using only Azure Functions so other elastic offerings are a better fit.

    For me, it's the same. As a developer, I don't have to care about infrastructure. It autoscales.

    It kind of is the same, except that IMHO serverless bears all the characteristics of Elastic computing but withouth the management of the underlying infrastructure. In the end, the workload determines what the best fit is, serverless or not, or a combination of both. For example, we build applications that run on AKS but those apps delegate some work to Azure Functions.

    So, summarized: serverless = elastic computing - infrastructure management.