January 31, 2018What is Serverless Computing and What are its Benefits?

Understand the concept of Serverless Computing in simple terms, and then have a look at its advantages.

Before we look at Serverless Computing, let’s first understand how the traditional “server-based” computing works.

Server-based Computing typically follows a 3-tier architecture. In 3-tier architecture, we have a database layer, an application layer, and a presentation layer. The database layer is where the database server is. Application layer is where your application code runs. And, presentation layer is where the UI is provided to the end user. End users can interact with your application or your website in variety of ways. They can use their web browser, or a mobile smartphone, or even an IoT device depending on how you’ve designed your application.

Now, even before you start writing your server-based application, you have to make sure that a couple of things are in place. You’ve to:

  • Create and setup your server
  • Install operating systems, necessary software, and,
  • On ongoing basis, you also have to manage the server, manage the operating systems, take care of the hardware upgrades, software updates, and so on.
  • You also have to make sure that your application is highly-available and fault-tolerant.
  • You might also need to have load-balancers in your applications.

And all this comes with added resources, added infrastructure, added costs.

Serverless Computing changes this paradigm altogether. All the steps that we discussed above, apart from writing your application code, are no longer needed with serverless applications.

Serverless applications allow you to focus on your application logic without having to worry about any servers. There are no servers to maintain, no operating systems to take care of, no software to manage, no hardware to upgrade. And, your applications have built-in high-availability and fault-tolerance. This simply means faster time to market.

You can really focus your energies on your core application logic and build your applications with high-availability virtually at any scale, without having to worry about any servers or operating systems.

Four main benefits of Serverless Computing

Now let’s look at the four main benefits of serverless computing.

  1. First, as we discussed, there are no servers or operating systems to maintain. You don’t have to manage any servers or even have to install any operating systems or supporting software.
  2. Second, easy and efficient scaling. Serverless applications can be scaled automatically or at the most with a few clicks to choose your desired capacity. There is no need to create any specialized scalable architecture or designs.
  3. Third, high availability. Serverless applications have built-in availability and fault tolerance. So you don’t need to have any specialized infrastructure to make your applications highly available or fault tolerant. All this is available to you by default.
  4. Fourth, and this is a big one. No idle capacity. You pay only for what you
    use and no more. For example, with traditional architecture, say you created a server with 100 GB of memory and you’re using only 10 GB of it. But still, you’ll have to pay for the 90 GB that you’re not using. But with serverless architecture, you pay only for what you use. So if you’re using 10 GB, you only pay for 10 GB.

Also, with AWS Lambda which is the core component of Amazon’s serverless platform, you pay only for the time your code runs. So there is no charge if your code is not running. So if your code runs for say 100 milliseconds you are charged only for that 100 milliseconds and no more. That’s really a very fine grained control and results in a substantial cost savings for your business!

If you’d like to learn more about Serverless Computing using AWS Lambda, I talk more about this and take you through intensive hand-on labs in my new online course AWS Lambda & Serverless Architecture Bootcamp. This 25+ hours long course might just be the only course you’ll ever need to master AWS Lambda and Serverless Computing. But don’t just take my word for it. Preview the course and find out for yourself.

Subscribe to my YouTube Channel if you’re interested in more informative write-ups like these in the future!

Riyaz Sayyad

Riyaz Sayyad

Co-founder and Software Developer

Riyaz is an AWS Certified Database Specialist, Developer, and an expert IT Consultant with over 17 years of experience in the IT industry.