Serverless computing provides a cost-effective way for companies to leverage the power of edge computing by eliminating upfront fees and outsourcing the cost of operating and maintaining servers to cloud providers. This is crucial for companies who are hesitant to take advantage of edge computing, due to the cost of building and maintaining distributed infrastructure. Not only does serverless computing reduce capital expenditures and maintenance costs, performing serverless workloads at the edge has significant long-term cost advantages as a result of the reduced distance data has to travel, necessitating less bandwidth and computational power than processing in cloud providers’ centralized data centers.
This post will examine the economics of serverless computing, including the factors affecting computing costs, the various pricing models for computing infrastructure, and how Azion’s Edge Functions compares to the costs of other FaaS products.
Factors Affecting Computing Costs
The total cost of building and running a digital business extends far beyond the developer hours needed to create applications and digital services. It includes the capital, energy, and operational expenses needed to build or lease and maintain infrastructure, such as:
- Cost of capital: upfront costs including developer hours, licensing software, building or leasing hardware (computers, servers, networking equipment), and building or leasing facilities where servers are operated
- Cost of energy: costs for Internet connectivity and power needed to build and run applications and store data, including redundancies needed to ensure reliability
- Cost of maintenance: operational expenditures such as application lifecycle management, security, analytics, monitoring and updating software, installing physical hardware fixes, and maintaining or replacing aging equipment
Ultimately, more time and money spent on capital expenditures means higher barriers to entry and stretches the time to market. Heavy capital investments and operating costs of running servers and data equipment burdens startups, small businesses, and companies operating in competitive or fast-moving industries where agility is a distinct advantage.
In addition, the more time and money companies spend on rote maintenance, the less resources they are able to dedicate to innovating solutions that will generate new revenue.
How Costs Are Calculated
In-house Data Center Costs
Although companies that exclusively rely on their own in-house data centers are increasingly few and far between, many companies still utilize them for workloads that require high security or performance. These in-house, or on-prem, data centers consist of servers, networking hardware, and other IT equipment that are owned and operated by the company itself, and housed on company property.
With in-house data centers, the company is responsible for not only the costs of purchasing, installing, operating, and maintaining their own equipment, but also the design, installation, and maintenance of the building and subsystems where it is housed, in addition to paying for monthly energy costs and property taxes.
In an attempt to reduce capital expenditures, many companies turn to remote facilities, which lease out floor space, supply electrical power, and monitor Internet connectivity; however, the customers own and operate their own equipment, so customers have a level of operating responsibility.
Colocation pricing models can vary from vendor to vendor, but generally break down according to the services provided by the facility. A blog post from the data center aggregate site datacenters.com lists five different services that colocation data centers may charge for:
- Physical Space: the amount of rack space needed to house servers
- Power consumption: electricity and cooling costs, including backup power
- Data connectivity: Internet connections distributed across customer equipment
- Cross-connection: charges for running cables that connect equipment in different racks
- Labor and IT support: charges for equipment installation, set up, and layout changes
In addition, the company must purchase and manage its own equipment. Not only does this involve significant startup costs, it also means hiring highly skilled (and thus highly paid) technicians to perform upgrades and other maintenance tasks, as well as purchasing new equipment to replace hardware that is outdated or has deprecated over time.
Cloud Computing Costs
The emergence of cloud computing enabled companies to further reduce capital expenditures and enabled more cost-efficient resource use by delivering managed virtual compute resources over the Internet. However, like colocation and data center costs, cloud computing costs are dependent on multiple factors, and pricing models reflect that complexity, with separate charges for:
- Compute instances: charges for RAM and CPU
- Data storage: charges per GB of storage
- Networking: charges per GB of data downloaded
These costs can be structured as per-use (charges for hourly usage of CPU and RAM and GBs of data stored and transferred), subscription-based (charges for reserving a preselected number of units for a specific time frame), or hybrid (charges for reserving dedicated servers, with per-use charges applied after reserved capacity is exceeded).
Sources of Cloud Spending Waste
Although cloud computing helps to alleviate some resource waste, the complexity of cloud pricing can result in hidden or unexpected costs. Flexera’s 2020 State of the Cloud Report stated that companies estimated 30% of cloud resources are wasted and 82% of companies listing managing cloud spend as a key challenge. A 2020 Deloitte article noted several areas of spending waste, including:
- Orphaned resources with no purpose, sometimes left running indefinitely
- Difficulty understanding cloud pricing, leading to suboptimal use of reserved capacity
- Overprovisioning resources due to replicating on-premise policies in the cloud
- Tech debt due to inefficient engineering processes and lack of modern workforce skills
- The complexity of managing software licenses, often resulting in redundant subscriptions
How Serverless Computing Reduces Costs
Serverless computing, or FaaS, removes many of the sources of overspending resulting from on-prem infrastructure and traditional cloud models by enabling the creation of single-purpose, event-driven functions that are paid for on an as-needed basis. These functions are stateless and ephemeral, and do not require the use of dedicated servers to run applications, as IaaS and PaaS solutions do. This enables pay-as-you-go pricing with more granular autoscaling, less configuration, less operational tasks, and no software license to manage.
As a result, companies can eliminate overhead from both wasted resources and spend developer hours on innovating and bringing products to market. In addition, the ability to create single-purpose, event-driven functions provides an easy way to break up legacy applications, reducing technical debt and enabling a modernized workflow.
Serverless computing reduces costs through:
- No upfront costs for provisioning resources
- Enabling smooth migration from legacy applications
- Less developer hours spent on management
- Efficient resource use with pay-as-you-go pricing
However, not all FaaS solutions are created equal. Standard FaaS solutions like AWS Lambda and Microsoft Azure deliver from the cloud, requiring more bandwidth and computational power to move data to and from faraway hyperscale data centers for processing. In addition, these solutions run inside containers, requiring additional configuration, provisioning, and resource use that can cause costs to mount.
Standard Pricing Schemes for Serverless Computing
Although serverless computing is an attractive option for companies looking to save on operational expenses, cloud vendor costs can appear deceptively low on first glance, resulting in unexpected charges. Cloud vendors typically charge low fees per invocation, but as noted in a blog post by TechBeacon, the cost of FaaS is far greater than simply multiplying the number of invocations by the cost per invocation: “The execution of functions takes up valuable compute resources, and both AWS and Azure charge additionally for the combination of allocated memory and the elapsed time of function execution.”
As a result, the total cost of running serverless functions is dependent on three factors:
- Number of invocations
- Complexity and duration of workloads
- Amount of memory needed to execute functions
Unlike Edge Functions, AWS Lambda and Microsoft Azure require developers to allocate memory to each function ahead of time; based on this configuration, vendors will allocate proportional CPU, bandwidth, and other resources. As a result, developers may run into the same issues with overprovisioning and wasted resources (or performance hiccups that can result from underprovisioning) as they would with on-prem and traditional cloud models.
How Edge Functions Compares with Other FaaS Costs
The need to allocate memory to each function in AWS Lambda and Microsoft Azure is the result of running functions in containers–a method of segmentation that packages each function with its own share of CPU, memory, OS kernel, and other resources. Azion’s Edge Functions uses a different model, multitenancy, which enables more efficient resource use.
With Edge Functions, compute resources are shared across functions, which are kept isolated in secure sandboxes using Google’s V8 Engine. As a result, invocations use less resources and cost less to run. In addition, there is no separate charge for memory use and no need to deploy or instantiate containers, resulting in lower operational costs. And, because Edge Functions are delivered from distributed Edge Computing locations rather than hyperscale data centers, they take less time to execute, resulting in shorter (and thus less expensive) workloads.
Azion’s Edge Functions reduces FaaS costs through:
- No separate charges for memory
- More efficient resource use
- Reduced operational costs
- Less time to execute
Adopting the Benefits of a Serverless Model
The serverless computing model significantly reduces the costs of computing by eliminating much of the capital and maintenance costs needed for running an application. In addition, it minimizes resource use and enables pay-as-you-go pricing for each individual function invocation. By delivering serverless computing from the edge, Azion’s Edge Functions enables low-latency, resource-efficient, and cost-effective applications and services.
Edge Functions is now available to all Azion users in beta release. Try out Edge Functions and leverage the benefits of serverless computing by creating a free Azion account today.