<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1050989841627822&amp;ev=PageView&amp;noscript=1">

Serverless architectures are internet based systems where the application development does not use the usual server process. Instead they rely solely on a combination of third-party services, client-side logic, and service hosted remote procedure calls.

Since serverless computing is a broad topic and many of our customers ask very specific questions, we decided to put together this resource page for everyone to learn more about serverless. We hope you’ll enjoy this article – feel free to share it with your colleagues or ask our specialists anything you want to know about serverless.

Chapter 1: Serverless Computing Explained

dots-png

In the early days of the web, anyone who wanted to build a web application had to own the physical hardware required to run a server, which is a cumbersome and expensive undertaking.

Then came the cloud, where fixed numbers of servers or amounts of server space could be rented remotely. Developers and companies who rent these fixed units of server space generally over-purchase to ensure that a spike in traffic or activity wouldn’t exceed their monthly limits and break their applications. This meant that much of the server space that was paid for usually went to waste. Cloud vendors have introduced auto-scaling models to address the issue, but even with auto-scaling an unwanted spike in activity, such as a DDoS attack, could end up being very expensive.

Serverless is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. A serverless application runs in stateless compute containers that are event-triggered, ephemeral (may last for one invocation), and fully managed by the cloud provider. Pricing is based on the number of executions rather than pre-purchased compute capacity.

The code is typically run inside stateless containers that can be triggered by a variety of events including http requests, database events, queuing services, monitoring alerts, file uploads, scheduled events (cron jobs), etc. The code that is sent to the cloud provider for execution is usually in the form of a function. Hence serverless is sometimes referred to as “Functions as a Service” or “FaaS”.

Serverless applications are event-driven cloud-based systems where application development rely solely on a combination of third-party services, client-side logic and cloud-hosted remote procedure calls (Functions as a Service).

As developer Mike Roberts explains, the term was once used for so-called back-end-as-a-service scenarios, where a mobile app would connect to a back-end server hosted entirely in the cloud. But today when people talk about serverless computing, or a serverless architecture, they mean function-as-a-service offerings, in which a customer writes code that only tackles business logic and uploads it to a provider. That provider takes care of all hardware provisioning, virtual machine and container management, and even tasks like multithreading that often are built into application code.

traditional-vs-serverless

Image Source

The term “Serverless” is confusing since with such applications there are both server hardware and server processes running somewhere, but the difference compared to normal approaches is that the organization building and supporting a ‘Serverless’ application is not looking after that hardware or those processes. They are outsourcing this responsibility to someone else.

Chapter 2: Why Serverless

dots-png

Serverless computing offers a number of advantages over traditional cloud-based or server-centric infrastructure. For many developers, serverless architectures offer greater scalability, more flexibility, and quicker time to release, all at a reduced cost. With serverless architectures, developers do not need to worry about purchasing, provisioning, and managing backend servers. However, serverless computing is not a magic bullet for all web application developers.

Serverless computing can simplify the process of deploying code into production. Scaling, capacity planning and maintenance operations may be hidden from the developer or operator. Serverless code can be used in conjunction with code deployed in traditional styles, such as microservices. Alternatively, applications can be written to be purely serverless and use no provisioned servers at all.

serverless-adoption-590x332-1

Image Source

The difference between traditional cloud computing and serverless is that you, the customer who requires the computing, doesn’t pay for underutilized resources. Instead of spinning up a server in AWS for example, you’re just spinning up some code execution time. The serverless computing service takes your functions as input, performs logic, returns your output, and then shuts down. You are only billed for the resources used during the execution of those functions.

Serverless architectures are internet-based systems where the application development does not use the usual server process. Instead, they rely solely on a combination of third-party services, client-side logic and service-hosted remote procedure calls (Functions as a Service).

“Not the usual server process” means that your software isn't running on a server that you have access to. You don't own those servers. You can't log in to them, even if you wanted to. They are abstracted away and managed for you by someone else, typically a cloud provider.

There are many immediate benefits to not managing your own servers:

  • You don't have to worry about them randomly rebooting or going down.
  • You don't end up with snowflake servers, where you don't know quite what's installed on them but they are mission-critical to your organisation.
  • You're not responsible for installing software on them. Even if you use configuration management tools such as Chef or Ansible to automate this, that’s still extra code you have to maintain over time.

Chapter 3: Serverless Computing Benefits

dots-png

Serverless computing offers several benefits when compared to other computing models.

Lower costs

Serverless computing is generally very cost-effective, as traditional cloud providers of backend services (server allocation) often result in the user paying for unused space or idle CPU time.

No server management

Although 'serverless' computing does actually takes place on servers, developers never have to deal with the servers. They are managed by the vendor. This can reduce the investment necessary in DevOps, which lowers expenses, and it also frees up developers to create and expand their applications without being constrained by server capacity.

Simplified scalability

Developers using serverless architecture don’t have to worry about policies to scale up their code. The serverless vendor handles all of the scaling on demand. As a result, a serverless application will be able to handle an unusually high number of requests just as well as it can process a single request from a single user. A traditionally structured application with a fixed amount of server space can be overwhelmed by a sudden increase in usage.

Quick deployments and updates

Using a serverless infrastructure, there is no need to upload code to servers or do any backend configuration in order to release a working version of an application. Developers can very quickly upload bits of code and release a new product. They can upload code all at once or one function at a time, since the application is not a single monolithic stack but rather a collection of functions provisioned by the vendor.

Simplified backend code

Because the application is not hosted on an origin server, its code can be run from anywhere. It is therefore possible, depending on the vendor used, to run application functions on servers that are close to the end user. This reduces latency because requests from the user no longer have to travel all the way to an origin server

Quicker turnaround

Serverless architecture can significantly cut time to market. Instead of needing a complicated deploy process to roll out bug fixes and new features, developers can add and modify code on a piecemeal basis.

 

Chapter 4: Serveless vs Containers

dots-png

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. Which style of architecture a developer should use depends on the needs of the application, but serverless applications are more scalable and usually more cost-effective.

Before we compare serverless computing and containers, let’s first discuss containers.

A container, according to Docker, is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, and settings.

Containers solve the problem of running software when it has been moved from one computing environment by essentially isolating it from its environment. For instance, containers allow you to move software from development to staging and from staging to production, and have it run reliably regardless of the differences of all the environments.

Instead of virtualizing the hardware stack as with the virtual machines approach, containers virtualize at the operating system level, with multiple containers running atop the OS kernel directly. This means that containers are far more lightweight: they share the OS kernel, start much faster, and use a fraction of the memory compared to booting an entire OS.

There are many container formats available. Docker is a popular, open-source container format that is supported on Google Cloud Platform and by Google Kubernetes Engine.

Container-diagram-590x249-1

Image Source

Developers who choose a serverless architecture will be able to release and iterate new applications quickly, without having to worry about whether or not the application can scale. In addition, if an application does not see consistent traffic or usage, serverless computing will be more cost-efficient than containers, because the code does not need to be constantly running.

Containers give developers more control over the environment the application runs in (although this also comes with more maintenance) and the languages and libraries used. Because of this, containers are extremely useful for migrating legacy applications to the cloud, since it is possible to more closely replicate the application's original running environment.

It is also possible to use a hybrid architecture, with some serverless functions and some functions deployed in containers. For instance, if an application function requires more memory than allotted by the serverless vendor, if a function is too large, or if certain functions but not others need to be long-running, a hybrid architecture enables developers to reap the benefits of serverless while still using containers for the functions serverless cannot support.

Instead of choosing one or the other, serverless and containers can also be used side by side. Indeed, many companies have found success with a hybrid approach. They:

  • Use serverless for workloads where serverless meets their needs
  • Use containers for where it doesn't, for example, for workloads that:
    • Are long-running
    • Require more predictable performance
    • Require more resilience than can be easily achieved with serverless
    • Run at significant scale constantly, and the pay-per-invocation pricing model becomes too costly

 

serverlessdeployment

Image Source

 

Conclusion

dots-png

Serverless is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. A serverless application runs in stateless compute containers that are event-triggered, ephemeral (may last for one invocation), and fully managed by the cloud provider.

Serverless computing offers several benefits when compared to other computing models, like reduced costs, easier scalability, faster deployment etc. It can also be combined with containers, with some serverless functions and some functions deployed in containers.

GlobalDots can help you orchestrate your serverless stack to reduce costs and increase deployment speed.

Contact us today to help you out with your performance and security needs.

 

 

WHAT OUR CUSTOMERS ARE SAYING

Payoneer-logo-stars-1

“GlobalDots has helped us a lot in monitoring without human intervention.

The anomaly detection basically discovered 80% of the bugs we have, and 100% of the downtime we had.

It has by far surpassed anything we thought it will achieve in a way the alerts become almost irrelevant.”

Shmulik Ahituv, Payoneer
DevOps Team Leader

BioCatch-logo-stars-1

“This platform is nothing short of amazing!

On the first day (and without any customization whatsoever) we already got new insight that we were not able to see before.

A week in and our ops teams across the board were already able to get so much more out of our logs. It's a game changer.”

Dekel Shavit,
Biocatch
CISO

KalioCommerce-logo-stars-1

"I approached GlobalDots because I was looking for a great cloud-based WAF and DDoS protection provider for our customers that would not hinder performance. GlobalDots helped me by discussing the options on the market and helping us choose the best fit for us. The result was a great product at a great price. It was an easy and informative experience and I would recommend GlobalDots to anyone that is in the market for IT performance and security technologies."

Eric Joyce, KalioCommerce
Director, Hosting and Security

START THE CONVERSATION

dots-png-w

Request a FREE Consultation with our Specialists

form-arrow