DEV Community

Cover image for Server-less Computing for Beginners.
Romeo Agbor Peter
Romeo Agbor Peter

Posted on • Edited on • Originally published at romeopeter.com

Server-less Computing for Beginners.

Serverless Computing is a Cloud Computing execution model that allows you to run your application code on an allocated space on a CPU and memory without worrying about the hassle and trouble of the underlying OS, software platform, and the underlying server. Just take your code and run it!

Using Serverless Computing.

Serverless Computing is offered as an on-demand service by public Cloud providers, such as AWS, Google Cloud Platform, Microsoft Azure, and IBM Cloud as managed service. This where FaaS comes in.

Function as a Service (FaaS).

This means writing code as a function that performs a specific task or service on an allocated resource (RAM) required to run the code on the serverless cloud computing service. The service manages the amount of RAM and CPU cycles your code needs to run.

Pros and Cons of Serverless Computing.

Here is a list of what you can benefit from Serverless Computing as a developer.

  • No "ware" to manage: There is no software or hardware to manage in serverless computing. The management of the application, computing environment and underlying hardware is taken care of by the cloud provider.

  • Faster execution time: The boot-up time for an application running on serverless model instances is super fast. It is due to functions running on independent containerized platforms.

  • Cost-effectiveness: Service charge is based on the duration of your code and the memory it consumes. Backend functions are only called when needed by the serverless application, and the code automatically scales up as required. The duration is calculated from the time the functions begin executing to the time they terminate, and it's rounded to the nearest 100 ms. Serverless provisioning is dynamic, precise, and real-time.

  • Wide support for programming languages: Popular programming languages are supported by serverless cloud providers. Languages such as C#, NodeJS, Python JavaScript, Rust, C++, Java, and Ruby all have support in serverless computing.

  • Microservice compatible. Traditionally, monolithic applications do not scale effectively, but the introduction of microservice in serverless computing has made it possible to scale at ease. Applications are broken down into small independent services designed to perform specific tasks and called when needed, rather than monolithically.

Cons of Serverless Computing.

  • Debugging and Testing: Debugging and Testing can pose a challenge since the serverless environment can be not easily replicated to see how your code will work when deployed. Developers should not have unnecessary microservices running because they do not have visibility to the serverless backend process. Limiting microservices to what is necessary will make managing services and debugging code easy for the developer.

  • Execution duration: Serverless functions run for a short duration of time. This is a limit set by most cloud providers, but there are workarounds to it.

  • Stateless: Serverless functions are stateless. That means nothing is stored in memory when a function executes or terminates.

  • Lack of tools: Serverless computing in all its glory still lacks support for some out-of-the-box tools for deployment, management and monitoring.

  • Complexity: The more code is split into little services (microservices), the more complex they become when you view the application as a whole system. Running small independent functions to perform specific tasks is good, but having too many can and will make the application complex to manage.

  • vendor lock-in: This is one big problem with public cloud vendors. Cloud vendors provide their own unique set of tools, and backend services, thus increasing the developers' reliance on the provider, it becomes hard to switch to other vendors. Even when successful, adapting to different tools and workflow becomes a challenge.

Conclusion

The advent of Serverless computing has brought about an efficient and cost-effective way for IT organization and developers to deploy their applications to the cloud with ease. It does come with its disadvantage, but the advantages of using the serverless model beat the disadvantages.

What do you think of server-less computing?

To learn more about server-less computing, check out the full article.

Top comments (0)