top of page

Two Part Serverless Lab - Part One

Writer: Tyler WallTyler Wall

Updated: Feb 12



two part serverless labs


Two Part Serverless Lab - Part One

We will kick this serverless lab off with an introduction to serverless computing.




Serverless computing is a way of handling backend services as needed. Instead of worrying about the technical details of the underlying infrastructure, a serverless provider lets users write and deploy code without the hassle. With this approach, a company using serverless is billed based on their actual usage, avoiding the need to reserve and pay for a fixed amount of resources. Even though physical servers are still in play, developers don't need to think about them.


In the early days of the internet, building a web application required owning the physical hardware to run a server. This was both cumbersome and costly.


Then came cloud computing, where remote servers or server space could be rented. However, developers often over-purchased to prevent traffic spikes from breaking their applications. Even with auto-scaling, unforeseen events like a DDoS attack could lead to high costs. This is Two Part Serverless Labs - Part One.



What are Backend Services?

Application development is divided into frontend and backend. The frontend is what users see and interact with, while the backend includes servers and databases handling application files and data.


For instance, in a concert ticket website, when a user searches for an artist, the frontend sends a request to the backend, which retrieves the data from a database and sends it back to the frontend.



Benefits of Serverless

Serverless computing lets developers buy backend services on a flexible, pay-as-you-go basis. It's like switching from a monthly fixed data plan to paying only for the data used.


Despite the name "serverless," servers are still involved, but all the management is handled by the vendor. Developers can focus on their work without dealing with server concerns.


Advantages of Serverless Computing

The advantages of serverless computer are threefold in nature. The provide for lower costs since you are only paying for what is used. It provides for simplified scalability because serverless vendors handle the scaling on demand. Lastly it provides for quicker turnaround. The serverless architecture speeds up development and deployment.


Comparison with Other Cloud Backend Models

  • In comparison with Platform-as-a-Service (PaaS), PaaS provides tools for development but isn't as easily scalable and may have startup delays.

  • In comparison with Infrastructure-as-a-Service (IaaS), IaaS involves hosting infrastructure but doesn't necessarily mean serverless functionality.



Difference between Serverless and Containers

One last thing that was confusing to me and may be to you is the difference between containers and Serverless.  Both serverless computing and containers enable developers to build applications with far less overhead and more flexibility than applications hosted on traditional servers or virtual machines.


  • Serverless applications are more scalable and usually more cost-effective since they only run when needed and are more lightweight.  You can copy and paste code into the Cloud Service Provider and it will handle everything required to run that code.  Given that it is supported.

  • Modules, libraries, and dependencies in a Serverless instance are already installed and maintained by the Cloud Service Provider and ready to be used by your code.  

  • A container 'contains' both an application and all the elements the application needs to run properly, including system libraries, system settings, and other dependencies.  

  • Containers are a heavier package as it comes with everything that it needs to run.

  • Containers that need other containers are orchestrated to run together and that’s what Kubernetes does.


Drawbacks of Serverless Computing

Serverless computing is getting better as providers find solutions to improve its drawbacks. One of these drawbacks is called "cold starts."


Here's how it works: When a particular serverless function hasn't been used for a while, the provider turns it off to save energy. When a user runs an application that needs that function, the provider has to start it up again, causing a delay known as a "cold start."


Once the function is up and running, it responds much faster to subsequent requests (called "warm starts"). However, if the function isn't used for a while, it goes dormant again. This means the next user asking for that function will experience another cold start.


Serverless Vendors

When it comes to serverless computing there isn’t one giant cloud provider in the market, there are three: Amazon, Microsoft, and Google. Between them the triplet of US west-coast behemoths control more than half of the serverless computing market, with smaller players like IBM and Alibaba capturing the largest slices of what is left over.


While serverless computing and Infrastructure as a Service (IaaS) technologies are sometimes assumed to be almost commoditized these days with differences coming down to little more than price. The reality, though, is that there are, indeed, some important points of difference between the Amazon, Microsoft, and Google offers, and depending on your project and the use case you are addressing, there may well be a best option for you.


When it comes to assessing the big three players, there are some pretty clear preferences on the part of industry analysts.


Leading research and advisory firm Gartner, for one, puts Amazon out ahead of Microsoft and Google. Their annual Magic Quadrant for Cloud Infrastructure as a Service clearly recognizes that AWS, Azure, and GCP are leaders, but it also clearly establishes the superior offer that AWS delivers.


As Gartner explains, Amazon has the most mature serverless offer and serves the greatest diversity of customers.


Though there are a few words of caution about AWS with regards to pricing, focus, and the other activities of parent company Amazon impacting whether or not a client would want to deploy on their serverless infrastructure (Amazon.com competitor WalMart, for example) the industry view on AWS is overwhelmingly positive.


Microsoft finds itself well behind AWS, according to Gartner, but it is still well ahead of Google and the other niche actors (Alibaba, Oracle, and IBM). Significantly, for Gartner one of the core strengths of the Azure offer is their capacity to serve the IoT market. For smart, connected, and networked IoT devices, Azure as a Cloud provider could be a good choice, and perhaps even a superior one to the AWS offer.


However, there are two caveats: first, as Azure is still growing there are occasionally stability and downtime issues that AWS does not seem to suffer, and second, the level of technical support for development teams is not always the best.


As the third member of the industry’s big three serverless offerings, Google Cloud Platform is a leader thanks to its scale, but not thanks to its performance. Gartner explains that the company has “an immaturity of process and procedures” and is “difficult to transact with at times”. What’s more, they note that the limited number and expertise of partners doesn’t inspire a lot of confidence among some enterprise customers, though they also note that GCP is often a preferred choice for startups and scaleups.


On the bright side, Google seems to have containers right and also Gartner notes that Google has “differentiated technologies on the forward edge of IT, specifically in analytics and machine learning” and that this has encouraged machine learning and AI-focused firms to shift to Google in some cases.


For Gartner and, to be sure, for most in industry, the leadership of AWS as Cloud provider is undisputed. The market backs this up, too, because despite the rise of Azure and the advances made by Google, Amazon remains in front – and by a long way.


In the next section we will walk you through deploying a simple “hello world” AWS Lambda function to get you familiar with how Serverless works.  





Tyler Wall CEO Cyber NOW Education

Tyler Wall is the founder of Cyber NOW Education. He holds bills for a Master of Science from Purdue University and also CISSP, CCSK, CFSR, CEH, Sec+, Net+, and A+ certifications. He mastered the SOC after having held every position from analyst to architect and is the author of three books, 100+ professional articles, four online courses, and regularly holds webinars for new cybersecurity talent.


You can connect with him on LinkedIn.


To view my dozens of courses, visit my homepage and watch the trailers!


Become a Black Badge member of Cyber NOW® and enjoy all-access for life.


Check out my latest book, Jump-start Your SOC Analyst Career: A Roadmap to Cybersecurity Success, winner of the 2024 Cybersecurity Excellence Awards.






Comments


bottom of page