Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Serverless Computing

You're reading from   Hands-On Serverless Computing Build, run and orchestrate serverless applications using AWS Lambda, Microsoft Azure Functions, and Google Cloud Functions

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788836654
Length 350 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Kuldeep Chowhan Kuldeep Chowhan
Author Profile Icon Kuldeep Chowhan
Kuldeep Chowhan
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. What is Serverless Computing? 2. Development Environment, Tools, and SDKs FREE CHAPTER 3. Getting Started with AWS Lambda 4. Triggers and Events for AWS Lambda 5. Your First Serverless Application on AWS 6. Serverless Orchestration on AWS 7. Getting Started with Azure Functions 8. Triggers and Bindings for Azure Functions 9. Your First Serverless Application on Azure 10. Getting Started with Google Cloud Functions 11. Triggers and Events for Google Cloud Functions 12. Your First Serverless Application on Google Cloud 13. Reference Architecture for a Web App 14. Reference Architecture for a Real-time File Processing 15. Other Books You May Enjoy

The benefits of serverless computing

So far I have covered the definitions of serverless computing and FaaS. Let's now look at the benefits of serverless applications. Let's look at the benefits that serverless applications provide:

  • Reduced operational cost
  • Rapid development
  • Scaling costs
  • Easier operational management

Reduced operational cost

As we covered earlier in the book, serverless or FaaS applications run on the cloud provider in a fully managed environment. As there are only certain pre-defined runtimes where you can run your functions and the same runtimes are used by many other people within the cloud provider environment, the cloud provider is able to utilize the economy of scale effect and reduce the operational cost required to run your functions. The gains in cost that the cloud provider gets are also due to the fact that everyone shares the same infrastructure, including networking, and everyone will be using it only for a certain period of time rather than using it all the time, like in a traditional application.

These reduced costs of running the functions are passed down to the people consuming these FaaS offerings. They are charged very little for the execution of the functions and are charged in ms intervals. You will see similar benefits in using IaaS and PaaS solutions; however, FaaS takes it to the next level.

Rapid development

As FaaS applications run in an infrastructure that is fully managed by the cloud provider, automatically provisioned and automatically scaled based on the load by the cloud provider, you as a developer can just focus on writing the code that is required to solve your business problem rather than spend time figuring out how to spin up the server, making sure that it is highly available and scales based on the load.

AWS, Microsoft Azure, and GCP all provide various tools to develop and deploy your functions to their environment easily. We will talk about these in later chapters when we talk about setting your development environment and when we are ready to deploy our serverless applications.

Scaling costs

With FaaS offerings, horizontal scaling is something that is automatically managed by the cloud provider. They also take care of scaling up and scaling down the infrastructure that is required to process your functions. What this means is that you don't have to spend any time in developing the solutions yourself, everything is automatically taken care of for you. The cloud provider also takes care of ensuring that your functions are run in an environment that is highly available and that it runs across multiple availability zones (AZs) within a region. The other big benefit that you get is that the cloud provider takes care of patching the infrastructure automatically for you and you don't have to worry about it when there are security vulnerabilities to patch for the operating system or runtimes.

The big benefit with FaaS offerings is that for the compute infrastructure you only pay for what you need down to 100 ms execution time (AWS Lambda). Based on what your application traffic patterns are, this could result in huge cost savings for you:

Cost savings with serverless compared to traditional infrastructure

If you look at the preceding diagram, you will see that in a traditional infrastructure environment, you will always scale up in step functions to ensure that you are able to handle the load without effecting your application, but in a serverless/FaaS infrastructure environment, you scale up for what you need and don't have to scale up in step functions to handle your peak load. This gives you tremendous cost savings.

Another example would be, let's say, your application with traditional infrastructure processes only one request every minute and takes 100 ms to process each request, which will result in CPU usage of about 0.2 percent for the entire hour. If you look at the utilization of this infrastructure, it is very inefficient and you could have a lot of other applications running on the same infrastructure without impacting your application. With FaaS offerings, you will only pay for the 100 ms or 200 ms of computer time per minute, as that is what is used by your application and that would result in an overall time of 0.3% for the entire hour, which will result in huge savings for running your application in serverless architecture.

Easier operational management

So far we have talked about the benefits that serverless computing provides in areas such as scaling, rapid development, and reduced operational costs. Let's look at how FaaS offerings help us in reduced operation management of the application.

Easier packaging and deployment

The packaging and deployment of your application in a FaaS environment is really simple compared to deploying your application to a container or even an entire server. With FaaS, all you will be doing is creating your artifact (JAR (JVM)/ZIP (Node.js or Python)) and then uploading them directly to the FaaS offerings. You don't need any additional deployment or configuration management tools to deploy your applications to a FaaS environment. Some of the cloud providers do provide access to write the application directly in the console itself.

As there is no need to have additional configuration or deployment tools, system administration is significantly reduced.

Time to market

As the operational management in a FaaS environment is significantly reduced, the time it takes to make a business idea a reality is significantly less than what it takes in a traditional infrastructure environment, which means there is more time to try out more business ideas, which in turn is a win for your business. As less time is spent on operations, you have more people to work on solving business problems, which in turn can help you bring your idea to market faster.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image