Serverless Architecture

Farrel Abi
3 min readMay 2, 2021

This article was written as an individual review assignment for PPL CSUI 2021

One of the most interesting parts of developing a software project is deciding which architecture you will use. There are many options such as client-server architecture, monolith architecture, microservice architecture, serverless architecture, and many others that I haven’t mentioned. To choose the right architecture for your project, there are many aspects you would need to consider, for example, cost, timeline, team resource, and many more.

For a PPL project me and my team implement serverless architecture for our project. Serverless architecture is a software design pattern in which applications are hosted by third-party services, removing the need for software and hardware by developers. Applications are split into individual functions which are called and then executed by individuals as well.

Why use serverless computing?

Serverless computing offers a number of advantages over traditional cloud-based or server-centric infrastructure. For many programmers, serverless architectures offer greater scalability, more flexibility, faster time to release, and lower cost. With a serverless architecture, developers don’t have to worry about purchasing, provisioning, and managing servers as a backend. Here is a comparison between traditional and serverless architectures.

Who Should Use Serverless?

Using a serverless service provider is good if you have a small number of functions that need to be hosted. If your application is more complex, a serverless architecture might still work, but you need to architect your application in a very different way. It may make more sense to move a fraction of the application to serverless functionality over time.

What are the advantages of serverless computing?

1. No server management is required.

Even though ‘serverless’ computing actually takes place on the server, the developer never has to deal with the server. All of this is managed by the vendor. This reduces the required investment, lowers costs, and also frees developers to build and expand their applications without being limited by server capacity.

2. Developers are only charged for the server space they use.

Developers are only charged for what they use. Code only runs when backend functionality is required by a serverless application, and code is automatically scaled up as needed. The provision of resources is dynamic, precise, and real-time. In contrast, in traditional “server” architectures, developers have to project how much server capacity they will need and then buy that capacity.

3. Serverless architectures are inherently scalable.

Applications built on serverless infrastructure have scalability that automates as the user base grows or usage increases. If a function needs to run in multiple events, the vendor server will start, run, and end it as needed. So that serverless applications will be able to handle a very high number of requests. Traditionally structured applications with a fixed amount of server space can go down if their users suddenly increase.

4. Fast deployment and updates possible.

Using a serverless infrastructure, there is no need to upload code to the server or perform any backend configuration to release the latest version of the application. Developers can upload code at once or one function at a time because the application is a collection of functions provided by the vendor.

5. Code can run closer to the end-user and reduce latency.

Since the application is not actually hosted on the origin server, the code can be run from anywhere. This reduces latency as requests from users no longer have to travel far to the origin server

How My PPL Team Implement It

In my PPL team project, we use serverless architecture because we want to focus on our client-side as it is what our client cares about the most and because we have a tight deadline to be met. We use Firebase as our BaaS and when we need something that’s not provided by firebase by default, then we use the cloud function which is the implementation of the FaaS.

References:

https://newrelic.com/blog/best-practices/what-is-serverless-architecture#:~:text=Serverless%20architecture%20describes%20a%20way,pay%20for%20what%20you%20use.

https://www.fullstackfirebase.com/introduction/what-is-serverless

--

--