DevOps.com

Where the world meets DevOps

  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
    • IT as Code
  • DevOps Chats
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Virtual Summits
    • Conferences
  • Sponsored Communities
    • AWS Community Hub
    • CloudBees
    • IT as Code
  • Related Sites
    • MediaOps
    • Container Journal
    • Security Boulevard
    • SweetCode.io
    • Digital Anarchist
    • DevOps TV on YouTube
    • DevOps Chat on SoundCloud
    • DevOps Connect
    • DevOps Dozen
  • Media Kit
  • Follow Us
    • Twitter
    • Google News
    • LinkedIn
    • Facebook
    • DevOps TV on YouTube
    • Email
MENUMENU
  • AI
    • MLOps

      MLOps: More Than Automation

      Oracle observability platform

      Oracle Launches Observability Platform

      AIOps

      AIOps and the Myth of ‘Move Fast and Break Things’

      Granulate

      Granulate Applies AI to Linux Server Optimization

      Snyk

      Snyk Acquires DeepCode to Apply AI to DevSecOps

  • Cloud
    • observability

      Observe Unveils Observability Platform Built on Snowflake DBaaS

      Kong

      Kong Previews Application Connectivity Service

      Twilio

      Twilio Expands Scope of Cloud Services Portfolio

      Adobe

      Adobe Adds Tools for Building Custom Applications

      AWS autoscaling

      Optimize Performance, Cut Costs With AWS Autoscaling Services

  • Continuous Delivery
    • feature flags

      Feature Flags: The Cure for DevOps Remote Work Stress

      CI/CD

      CircleCI Brings Insights to CI/CD Platform

      logs

      How Logs Can Empower Your CI/CD Delivery Pipeline

      JFrog

      JFrog Sets Future Course Post-IPO

      DevOps Best Practices

      CircleCI Looks to Advance DevOps Best Practices Adoption

  • Continuous Testing
    • UI test

      Shift Left … With In-Sprint UI Test Automation (?!?)

      continuous testing

      Using Incident Response for Continuous Testing

      continuous testing

      Continuous Testing: Complementary to Agile and DevOps

      crowdtesting

      Crowdtesting: How to Ensure Quality in Disruptive Times

      Eggplant test

      Eggplant Employs AI to Surface Test Recommendations

  • DevSecOps
    • DevSecOps

      ZeroNorth Extends DevSecOps Orchestration Reach

      Sonatype

      Sonatype Advances Open Source Code Quality, Security

      API security

      Tips To Strengthen API Security

      survey DevSecOps

      Survey Surfaces Lots of DevSecOps Friction

      low-code

      Low-Code, High Risk? Closing the Security Gap of Exposed Source Code

  • Leadership Suite
    • low-code

      Low-Code the ‘Connective Tissue’ of Transformation

      recruitment

      Eliminating Unconscious Bias in Tech Recruitment

      enterprises

      Surveys Show COVID-19 Changes to Enterprises Likely Long-Term

      agility

      3 Steps for Organizational Agility in the COVID-19 Era

      developer

      Low-Code: An Oasis During Developer Drought

  • Practices
    • IBM DevOps

      Accelerate Your Digital Transformation with IBM

      SAP

      Bringing DevOps to SAP, With Basis Technologies

      codebase

      New Survey Highlights Codebase Size Problems

      Gitpod

      Gitpod Allies with GitLab to Automate Setting Up Dev Environments

      developers

      Developers Are Running With Scissors. Here’s How to Do It Safely

  • ROELBOB
    • another-monster-in-the-close

      Another Monster in the Closet

      my-rideshare-arch

      My Ride Share Architecture

      sre-anxiety

      SRE Anxiety

      manipulation-and-appeasement

      Appeasement and Manipulation

      4-stages-of-distributed-computing

      The 4 Stages of Distributed Computing

  • Toolbox
    • IBM DevOps

      Accelerate Your Digital Transformation with IBM

      feature flags

      Feature Flags: The Cure for DevOps Remote Work Stress

      Atlassian

      3 Ways Atlassian Usage is Evolving in the New Normal

      observability

      Sumo Logic Extends Observability Reach

      operations management

      How to Consolidate Your IT Operations Management Tools

  • IT as Code
  • More Topics
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » Should You Go ‘Serverless’? The Pros and Cons

Should You Go ‘Serverless’? The Pros and Cons

By Asaf Yigal on January 2, 2017 7 Comments

The popularity of the “serverless” term started to grow when Amazon launched AWS Lambda in 2014. Ever since, we’ve seen the term exponentially grow in use and reference, with more vendors entering the market with their own solutions (Azure recently went GA with Functions, for example).

Recent Posts By Asaf Yigal
  • Splunk and the ELK Stack: A Side-by-Side Comparison
  • SRE vs. DevOps — a False Distinction?
  • How DevOps is Killing QA
More from Asaf Yigal
Related Posts
  • Should You Go ‘Serverless’? The Pros and Cons
  • How Serverless Is Impacting the IT Landscape
  • Serverless Computing: Taking DevOps to the Next Level
    Related Categories
  • Blogs
  • DevOps in the Cloud
    Related Topics
  • architectures
  • BaaS
  • backend as a service
  • cloud
  • FaaS
  • function as a service
  • IaaS
  • Infrastructure-as-a-Service
  • PaaS
  • platform-as-a-service
  • serverless
Show more
Show less

What is it all about and how does this new trend affect the way people write and deploy applications? Is “serverless” a paradigm shift or just a natural evolution of infrastructure as a service (IaaS) and platform as a service (PaaS)? In this post, I will discuss what “serverless” is and is not—and how it shapes up in comparison to existing PaaS solutions.

What is ‘Serverless’?

“Serverless” denotes a special kind of software architecture in which application logic is executed in an environment without visible processes, operating systems, servers or virtual machines. It’s worth mentioning that such an environment is actually running on the top of an operating system and uses physical servers or virtual machines, but the responsibility for provisioning and managing the infrastructure belongs entirely to the service provider. Therefore, a software developer focuses on writing code.

In other words, a developer thinks in terms of services or functions that communicate with each other and with the external world. After implementing these services, developers using a traditional approach would combine them into a number of distributed processes when installing, running, monitoring and updating such processes for specific operating systems that are running on specific servers or virtual machines. In the “serverless” approach, a third-party service provider is responsible for everything from the processes to the operating systems to the servers.

When a third-party service provider is responsible for the underlying IT infrastructure, a developer no longer is in charge of purchasing a dedicated server or virtual machine. At the same time, the service provider is free to decide how to efficiently utilize its infrastructure to serve requests from all of its clients. As a result, the service provider is not usually required to run a permanent workload for a specific client; instead, the software handles requests from all of the customers at the same time, spending just a limited time on handling each request from a specific customer. Therefore, such providers usually charge their customers based on the total number of requests, the frequency of requests over a specified period or the total time spent to serve all of the requests from a customer.

The same approach works well for different types of loads because third-party service providers usually have elastic, scalable services. When customers start using a third-party service, the expected number of requests can be low and customers pay significantly less compared to purchasing, configuring and managing their own infrastructure on-premises or in the cloud. For a larger number of requests—either expected or unexpected load peaks—customers do not need to add servers to horizontally scale their application. Instead, a service provider does care about increased load. For sure, handling a bigger number of requests will cost more, but in most cases it is still more efficient than using a dedicated IT infrastructure.

BaaS and FaaS

Two approaches that often are mentioned together with serverless are backend as a service (BaaS) and function as a service (FaaS).

BaaS

The growing number of third-party services that implement required functionality, provide server-side logic and manage their internal states has led to applications that do not have application-specific, server-side logic and use third-party services for everything. In this respect,  such applications are serverless.

Some examples of third-party services include identity and authentication as a service (Auth0, AWS Cognito), logging as a service (Loggly, Logsense, Amazon Elasticsearch Service) and analytics as a service (Amazon Kinesis, Keen IO).

FaaS

When an application still requires specific server-side logic, a developer can use a modern alternative to traditional architectures: FaaS. With this approach, a developer focuses on implementing short-living stateless functions that are triggered by events and can communicate with each other and the external world. A FaaS provider does the rest—provisioning as many instances of such functions as necessary to handle all of the requests, terminate instances that are no longer required, monitor all of them and provide identity and logging services. FaaS ideally fits with microservices architecture because the FaaS provides everything that an organization needs for running microservices.

Auth0 Webtask, AWS Lambda, Google Cloud Functions and Azure Functions are examples of FaaS implementation. IronFunctions is an ambitious initiative from Iron.io that is targeted to run AWS Lambda functionality on the most popular cloud providers as well as on-premises.

What is Not ‘Serverless’?

The main difference between serverless and PaaS is that traditional PaaS providers such as Heroku or OpenShift usually lack the automatic scaling feature. A user of traditional PaaS has to specify the amount of resources—such as dynos for Heroku or gears for OpenShift—for the application. It still is possible to manually scale the application up or down by changing the number of assigned resources, but mostly this is the responsibility of a developer or system administrator.

The second difference is that traditional PaaSes are designed for long-running server applications. With such a design, the application always should be running to serve incoming requests. If you bring the application down, it obviously will not serve the requests. With FaaS, your function starts to serve a request and terminates when the request is processed. Ideally, your functions should not consume provider resources when there are no incoming requests (see also “cold start” issue below).

Traditional PaaS implementations are not “serverless” under the strict definition of this term because they do not have automated scaling and require that server-side applications are always running so that requests can be served. Traditional container management platforms are not “serverless” for the same reasons.

Another way to know if a provider allows the serverless approach is to identify the border between two areas of responsibility: the provider’s consumer and the provider itself. In “serverless,” the border is between application code and how is this code is actually deployed and running on physical servers. In container platforms, a platform’s consumer is still responsible for working with the operating-system level to define things such as the processes that will run in which containers and how many containers of each kind will run.

Nonetheless, there is an inherent similarity between containers and serverless. For example, Kubernetes—an open-source container orchestration platform—allows for the automated scaling of containers using application-provided metrics such as the number of concurrent requests. AWS Lambda actually runs a container for each function.

In other words, containers and container orchestration may provide an efficient way to implement FaaS while FaaS provides an additional abstraction level that hides specific processes, operating systems and containers from developers and allows them to focus on code.

The Benefits and Drawbacks of “Serverless”

As we already mentioned, “serverless” has the following main benefits:

  • Reduced time to market and quicker software release.
  • Lower operational and development costs.
  • A smaller cost to scale – there is no need for developers to implement code to scale and administrators do not need to upgrade existing servers or add additional ones.
  • Works with agile development and allows developers to focus on code and to deliver faster.
  • Fits with microservices, which can be implemented as functions.
  • Reduces the complexity of software.
  • Simplifies packaging and deployment and requires no system administration.

At the same time, “serverless” has the following drawbacks:

  • Serverless is not efficient for long-running applications. In certain cases, using long tasks can be much more expensive than, for example, running a workload on a dedicated server or virtual machine.
  • Vendor lock-in. Your application is completely dependent on a third-party provider. You do not have a full control of your application. Most likely, you cannot change your platform or provider without making significant changes to your application. Also, you are dependent on platform availability, and the platform’s API and costs can change. Needles to say, the existing FaaS implementations are not compatible with each other.
  • Serverless (and microservice) architectures introduce additional overhead for function/microservice calls. There are no “local” operations; you cannot assume that two communicating functions are located on the same server.
  • To utilize its resources more efficiently, a service provider may run software for several different customers on the same physical server (this is also known as “multitenancy”). Even if customers’ workloads are isolated in virtual machines or containers, there can be different bugs in the early stages of FaaS offerings. This can be a major security issue for your application if you work with sensitive data. Such potential bugs in a platform or failures in one customer’s code (a “noisy neighbor”) can affect the performance or availability of your application.
  • In practice, it takes some time for a scalable serverless platform to handle a first request by your function. This problem is know as “cold start”—a platform needs to initialize internal resources (AWS Lambda, for example, needs to start a container). The platform may also release such resources (such as stopping the container) if there have been no requests to your function for a long time. One option to avoid the cold start is to make sure your function remains in an active state by sending periodic requests to your function.
  • Some FaaS implementations—such as AWS Lambda—do not provide out-of-the-box tools to test functions locally (assuming that a developer will use the same cloud for testing). This is not an ideal decision, especially considering that you will pay for each function invocation. As a result, several third-party solutions are trying to fill this gap, enabling you to test functions locally.
  • Different FaaS implementations provide different methods for logging in functions. For example, AWS Lambda allows writing logs to AWS CloudWatch using the standard frameworks for the specific language (Log4j for Java, console methods for Node.js, logging module for Python). It is completely up to the developer how to implement more advanced logging.

Summary

Serverless architecture is a new approach to writing and deploying application that allows developers to focus on code. Such an approach can reduce time to market, operational costs and system complexity. While serverless leverages third-party services such as AWS Lambda to eliminate the requirement to set up and configure physical servers or virtual machines, it also locks in the application and its architecture to the specific service provider. In the future, we can expect more movement toward the unification of FaaS APIs or frameworks such as IronFunctions that will help to avoid vendor lock-in and enable us to run serverless applications on different cloud providers or even on-premises.

— Asaf Yigal

Filed Under: Blogs, DevOps in the Cloud Tagged With: architectures, BaaS, backend as a service, cloud, FaaS, function as a service, IaaS, Infrastructure-as-a-Service, PaaS, platform-as-a-service, serverless

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)

Like this:

Like Loading...
Sponsored Content
Featured eBook
The Automated Enterprise

The Automated Enterprise

“The Automated Enterprise” e-book shows the important role IT automation plays in business today. Optimize resources and speed development with Red Hat® management solutions, powered by Red Hat Ansible® Automation. IT automation helps your business better serve your customers, so you can be successful as you: Optimize resources by automating ... Read More
« The One Simple Reason to Consider Clustering
A New Year Approaches »

Upcoming Webinars

AWS Partner Roundtable: Episode 1
Tuesday, October 13, 2020 - 11:00 am EDT
Ship Apps Faster on AWS with Unified Visibility and Security
Tuesday, October 13, 2020 - 3:00 pm EDT
Introduction to Chaos Engineering: Finding Failures Before They Become Outages
Thursday, October 15, 2020 - 9:00 am EDT

TechStrong TV – Live Streaming

TechStrong TV - All Episodes

Top Stories of the Week

  • View DevOps.com Privacy Policy

Upcoming Webinars

Tue 13

AWS Partner Roundtable: Episode 1

Tue, October 13, 11:00 am - 12:00 pm EDT
Tue 13

Ship Apps Faster on AWS with Unified Visibility and Security

Tue, October 13, 3:00 pm - 4:00 pm EDT
Thu 15

Introduction to Chaos Engineering: Finding Failures Before They Become Outages

Thu, October 15, 9:00 am - 10:00 am EDT

More Webinars