What’s the Difference Between Cloud Computing and Serverless?
Tags: serverless, aws, saas
Published: 2019-08-19 16:48:56

<span style="font-weight: 400;">Just when you thought you understood cloud computing, a new concept appears: Serverless. </span>

<span style="font-weight: 400;">The layman's understanding of “the cloud” is close enough to the definition of Serverless it can leave you scratching your head and wondering, “Wait, how exactly are they different?” </span>

<span style="font-weight: 400;">Never fear, by the time you get to the end of this page you’ll understand <a href="https://northstack.com/what-is-serverless-the-60-second-answer/">what Serverless is</a>, how Serverless computing differs from “normal” cloud computing, and how they’re related to each other. </span>

<span style="font-weight: 400;">We'll start by nailing down what “cloud computing” means so we can understand Serverless in relation to it. </span>
<h2><span style="font-weight: 400;">What is cloud computing?</span></h2>
<span style="font-weight: 400;">Cloud computing is a buzzword that’s been used and abused to the point where it might mean very different things to different people. To find some consensus, let’s see what the authorities on the matter have to say about it. </span>

<span style="font-weight: 400;">From Amazon:</span>
<blockquote><i><span style="font-weight: 400;">“Cloud computing is the on-demand delivery of compute power, database storage, applications, and other IT resources through a cloud services platform via the internet with pay-as-you-go pricing.”&nbsp;<a href="https://aws.amazon.com/what-is-cloud-computing/">Source</a></span></i></blockquote>
<span style="font-weight: 400;">And here’s a definition from Microsoft:</span>
<blockquote><i><span style="font-weight: 400;">“Simply put, cloud computing is the delivery of computing services—servers, storage, databases, networking, software, analytics, intelligence and more—over the Internet (“the cloud”) to offer faster innovation, flexible resources, and economies of scale. You typically pay only for cloud services you use, helping lower your operating costs, run your infrastructure more efficiently, and scale as your business needs change.”&nbsp;</span></i><span style="font-weight: 400;"><a href="https://azure.microsoft.com/en-us/overview/what-is-cloud-computing/">Source</a></span></blockquote>
<span style="font-weight: 400;">To boil it down to the essentials: computer services are delivered over the internet and you pay for what you use. It’s efficient and it scales. Simple enough. </span>

<span style="font-weight: 400;">Here’s where things become more tricky… </span>
<h3><span style="font-weight: 400;">There are four types of Cloud Computing</span></h3>
<span style="font-weight: 400;">According to Microsoft, there are 4 major types of cloud computing:</span>
<ol>
 	<li style="font-weight: 400;"><a href="https://azure.microsoft.com/en-us/overview/what-is-iaas/"><span style="font-weight: 400;">Infrastructure as a Service</span></a><span style="font-weight: 400;"> (IaaS)</span></li>
 	<li style="font-weight: 400;"><a href="https://azure.microsoft.com/en-us/overview/what-is-paas/"><span style="font-weight: 400;">Platform as a Service</span></a><span style="font-weight: 400;"> (PaaS)</span></li>
 	<li style="font-weight: 400;"><a href="https://azure.microsoft.com/en-us/overview/what-is-saas/"><span style="font-weight: 400;">Software as a Service</span></a><span style="font-weight: 400;"> (SaaS)</span></li>
 	<li style="font-weight: 400;"><a href="https://azure.microsoft.com/en-us/overview/what-is-serverless-computing/"><span style="font-weight: 400;">Serverless</span></a></li>
</ol>
<span style="font-weight: 400;">To stay focused on the question at hand, we won’t bother getting into the definitions of these categories of cloud computing. But, to further your understanding of what Serverless is and how it relates to other forms of cloud computing, it’s worth noting that these four cloud computing categories build on top of each other, so they’re commonly referred to as the “cloud computing stack.” </span>
<h2><span style="font-weight: 400;">What is Serverless computing?</span></h2>
<span style="font-weight: 400;">“Serverless” is a bit of a misnomer or, at least, a somewhat misleading label, because somewhere in the world in enormous warehouses, there are definitely actual servers powering “Serverless” computing. </span>

<span style="font-weight: 400;">But, the term points to what ultimately makes Serverless so innovative and valuable: </span><i><span style="font-weight: 400;">with Serverless you don’t have to think about the server at all. </span></i><span style="font-weight: 400;">So, </span><i><span style="font-weight: 400;">in effect</span></i><span style="font-weight: 400;">, it’s “serverless,” though not technically or literally, and that’s where the term comes from. “The setup, capacity planning, and server management are invisible to you because they’re handled by the cloud provider,” </span><a href="https://azure.microsoft.com/en-us/overview/what-is-serverless-computing/"><span style="font-weight: 400;">according to Microsoft</span></a><span style="font-weight: 400;">, and, “Serverless applications don't require you to provision, scale, and manage any servers,” </span><a href="https://aws.amazon.com/serverless/"><span style="font-weight: 400;">according to Amazon</span></a><span style="font-weight: 400;">.</span>
<h3><span style="font-weight: 400;">The server disappears (from your list of concerns)</span></h3>
<span style="font-weight: 400;">Traditionally, if you were a developer you’d need to do quite a bit of work to set up and maintain a server for a new app or website. This process can be frustrating and time-consuming if you’re not a sysadmin by trade. Worse, if you make a mistake and configure something incorrectly it can lead to serious consequences —&nbsp;like a <a href="https://northstack.com/why-companies-are-moving-to-serverless-cloud-technology/">security breach</a>, downtime, or an inefficient use of resources (you end up paying more than you have to for hosting). </span>

<span style="font-weight: 400;">And, that’s exactly why Serverless is so appealing —&nbsp;it’s all taken care of. The chore of provisioning a server is done for you and you’re relieved of the ongoing burden of making sure everything is secure, up-to-date, and optimized. All server-related concerns are taken off your plate and handled by the Serverless cloud architecture.</span>
<h3><span style="font-weight: 400;">Hosting resources are supplied on demand</span></h3>
<span style="font-weight: 400;">To get into the more technical side of what is happening under the hood, the functions of the site/app are split out into separate containers and resources are applied to specific functions as needed. Whatever your site/app needs to run itself is served up on a silver platter. When your application needs more memory, it gets more memory allocated in real-time. When your application receives a thousand web requests, it gives you the compute cycles and bandwidth to deliver those requests. Your application has a need for computer resources, and the Serverless architecture ensures it has exactly what it needs when it needs it. And, this is another defining characteristic of Serverless... </span>
<h3><span style="font-weight: 400;">Precision allocation of resources</span></h3>
<span style="font-weight: 400;">Serverless delivers exact units of resources in response to a demand from the application. Contrast that with traditional cloud computing where chunks of resources need to be allocated in advance so that they’re available when they’re needed.</span>

With traditional cloud hosting, you might add 2GB or 4GB of RAM so that your application has sufficient memory available for peaks in usage. With Serverless, your application might request and be allocated exactly 3.76GB of RAM to complete some task. The allocation is exactly what is needed to meet the demand of the app/site.

<span style="font-weight: 400;">With traditional cloud computing, the computer resources are dedicated to you whether you’re using them or not while with Serverless, you’re dynamically pulling </span><i><span style="font-weight: 400;">only what you need</span></i><span style="font-weight: 400;"> from a vast ocean of resources.</span>
<h3><span style="font-weight: 400;">Pay only for what you use</span></h3>
<span style="font-weight: 400;">While the common definition of cloud computing speaks about “only paying for what you use,” Serverless delivers on that promise more literally. Sure, when you use Infrastructure as a Service you’re only paying for the server resources you asked for, but you’re still paying for 8GB of memory whether your application is using all 8GB at this moment or not.</span>

<span style="font-weight: 400;">With Serverless, you pay only for the exact amount of resources it takes to perform a function. If your website is only consuming 3.39 GB of memory at this moment, that’s all you’ll pay for.&nbsp;</span><span style="font-weight: 400;">For most websites there will be a constant flux in resource usage as a result of fluctuating demand. Serverless automatically adapts to those fluctuations (a term called elasticity) so that you literally only pay for what your application uses moment to moment.</span>

<span style="font-weight: 400;">This means that your Serverless hosting bill will vary month to month depending on what your website uses. If you have a slow month, your bill might be very low. If next month your traffic explodes, your bill will be much higher. In this way, Serverless computing is quite efficient. There is very little waste because your hosting plan automatically adjusts up and down. The downside is that this fluctuation can make billing unpredictable which can make it difficult to forecast a budget. Organizations that place a lot of value on predictable budgets may be better suited to more traditional hosting options, like VPS plans. &nbsp;</span>
<h2>Summary</h2>
Serverless hosting offers some unique benefits over common cloud computing that make it <a href="https://northstack.com/why-companies-are-moving-to-serverless-cloud-technology/">an attractive option for many businesses</a>:
<ul>
 	<li>No need to manage or interact with a server</li>
 	<li>Computing resources are supplied as needed to scale a site automatically</li>
 	<li>Resources are allocated precisely rather than in chunks</li>
 	<li>You pay only for the resources that are consumed</li>
</ul>
For more information on Serverless hosting, see our post, "<a href="https://northstack.com/what-is-serverless-the-60-second-answer/">What is Serverless? The 60-second answe</a>r."