ServerLess Computing

Aykhan Nazimzada
6 min readDec 8, 2020

In this article, I’m going to talk about ServerLess. That’s fact that everyone is talking about serverless, so why shouldn’t I. The first thing I want to say about this new buzzword is that serverless doesn’t mean no servers. Before I go deeper into this, I want to remind you of how we got to where we are today.

Not so long ago, companies and the individuals used to buy and manage their own software & hardware from networking infrastructure to data stores, servers to high-level responsibilities, hiring specialized teams, and the individuals for each responsibility. It was kind of the D.I.A.Y (Do It All Yourself). Then, the cloud came which is in combination with virtualization laid the ground for IaaS (Infrastructure as a Service), PaaS (Platform as a Service) and similar services which made companies and individuals happy. These technologies and trends allowed us to focus on the business logic more. So, lead time has shortened and the creation of software from requirement gathering to production ready software has become relatively easier, cheaper, and quicker. Afterward, the containerization wave came, and we started to hear about deploying single instances and units that use enough resources from the host. And new service emerged, CaaS (Container as a Service). I’m hearing you saying that “dude, I want to hear about serverless, what’s with the history class”. You are actually right, but I want you to know all these stuff because these all are for building and deploying software easier, cheaper, and quicker together with reduced risks and increased efficiency. Serverless is nothing but a step forward in this evolution. You see for each of these advancements such as Cloud, IaaS, PaaS, CaaS, for each one of these, some headaches have been gone and a lot of burden has been lifted from our shoulders. That’s great but there are still some headaches that we still need to deal with like servers, the logic they require and everything from creating server-side, code that perform a lot of functionalities that are not related to the business logic such as routing, security, authentication, authorization, maintaining and debugging. Server-side of the application are still done by developers. Serverless came to make another headache disappear; building and managing the server-side of application. Serverless is building software by focusing more on business logic without thinking about how you are going to serve your software. It is like there is no server, just business logic. I know it really sounds weird but that doesn’t mean there is no server-side work done by developers at all. There will be still some configuration and integration work, but all those headaches of the back-end developers used to go through are gone with Serverless.

Serverless is building software without worrying about servers. This new model or new way of thinking has specific mechanisms or constraints we need to follow which is how it works. Before I explain, I want to say that this approach forces us to use new architectural patterns and styles in building our software. More specifically event-driven distributed pattern works well with this model. But we have to be careful here, software architects might be obliged to make some changes regarding the architectural patterns they have used.

So, how does this serverless computing work? Here, we have the client on the right side, the developer on the left side and in between is where the magic happens. We basically write business logic and deploy it to the provider for instance, Amazon which encapsulates code units in forms of functions. This is where actually the FaaS (Function as a Service) acronym came from. So, whenever a client request comes to your application, a notification gets triggered to a service that is listening for clients requests. After that, the server tries to locate the code that is responsible for answering the request. When it finds it, it is loaded into a container, then the code gets executed, the answer gets constructed and sent to the client. That’s pretty much it. Now, I have mentioned the term FaaS as serving your code units as functions which is your business logic. That’s only one aspect of this model. The other aspect of serverless is that you get to have all the responsibilities done for you through BaaS (Back-end as a Service) like authentication and routing. I’m sure you’ve heard Amazon API gateway before. This technology belong to serverless computing, is considered as back-end services. And this is serverless in a nutshell.

In this place, let me briefly list the pros and cons of serverless which is important to know in order to make the right decision. Just like all cloud services, the serverless model reduces or even eliminate the managing & maintaining server-side work and eventually reduces cost. You don’t have to hire anyone to do back-end work for you and save money. Another advantage is reduced risk and increased efficiency. By delegating and handling over server-side responsibilities to someone who is dedicated to such responsibilities and have a great expertise in this area, you will reduce the risk of doing the wrong thing or even failing to fix the system when it is down. Cloud providers ensure everything is going smoothly and even if something goes wrong, they are ready to fix it in a matter of time. Also, you don’t have to worry about security and updates. The best part is if your application certainly needs more resources or needs to scale that is handled for you in no time. This is impossible when you are managing your servers on your own. The last thing I want to say concerning serverless model is that, by letting you focus more on business, the prototyping cycle and lead time has significantly shortened in comparison to before.

However, this doesn’t mean serverless is the magic wand that will turn everything to gold. It has some limitations as well. Probably the most serious limitation is that managing stage for complex requests is tricky, and developers should know their way around this. Another limitation is the high latency. Because there will be a lot of calls and also the problem of what is known as the “cold start” which is when your code is requested while it is not running. These problems turn into issues for systems that need to be highly interactive in real time. One last limitation I want to talk about is the “vendor lock-in”. This simply means that you become very dependent on the service provider and certainly there are drawbacks in these situations. But I believe this will change in the near future as more cloud providers will enter the market and technologies gets more standardized. So, these are some limitations, and you might find others. It’s worth to mention that these are not proof of serverless is whether good or bad. Instead, it’s worth knowing because it lets you make the right choice.

Before I finish, let me tell you about some serverless computing providers, technologies and some examples of the things that can be built with serverless technology. “Amazon” is pioneer to enter this new evolution with “AWS lambda”, a serverless computing platform that adopts an event-driven approach and has what you need to create serverless apps. “Google Cloud” functions is another provider for serverless services, it has a different approach, but the model is pretty much the same. Lastly, “Google Firebase” is a well-known platform that you can use in this context. With serverless computing, you can build static websites, e-commerce platforms, chatbots, IoT services, big data apps, event-driven system and etc.

That’s all I know about Serverless Computing! Thanks for allocating your time!

--

--