The Transition From Server to Server-less Platforms

The era of computing started with desktop applications that ran on standalone computers. Over a period, the technology matured to client-server-based technology applications. This meant that businesses had to procure a dedicated stream of high-end servers and other related infrastructure. They had to also invest on a dedicated stream of resources to ensure that business runs as usual with minimal disruption.

One of the challenges that was noted in this approach was the ability to ramp-up and ramp-down infrastructure resources in real time. With the advent of cloud based services some of these challenges got addressed quickly.

Today the main players offering cloud services are Amazon Web Services(AWS), Microsoft-Azure and Google Cloud. More than 65% of the market share is occupied by these AWS and Azure.

From the context of this blog, I would focus on the services that are offered by AWS. AWS offers more than 100 services with each having their own unique objective. Of all those we will focus on services that does not require any server which incidentally is also a recent trend in the market.

As Wikipedia defines it, Serverless computing refers to a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. It can be a form of utility computing.

Let us go through an example to understand it.

In any typical software application, after development phase is completed and the application is ready for production deployment, A server is provisioned and application/product is deployed on it. This is a crux time as organization has to decide on what type of servers to purchase and what is the ideal duration if we are renting the servers. Many companies fail to sustain in the market even If the product/application is decent enough because they fail to scale.

Most of the time either the infrastructure is not capable enough to handle the load or they are underutilized. Secondly, after balancing the application needs Database server is provisioned to store the application and user data. In addition to that, Cron/Night jobs are created which maintain certain state of an application or in many cases backup and restore. Lastly, If the application contain huge amount of file/media additional file server is provisioned to maintain the application.

In server-less architecture entire process is analysed painstakingly and then replaced by specific AWS service. The following are some of the benefits that businesses have reaped by migration from server to serverless technology,

  • Better Cost Savings
  • Ease of deployment
  • Scalability
  • Improved Latency
  • Better security
  • Elimination Hardware concerns

Following are the steps to convert an application to serverless application:

Step 1: Identify all static contents in the application such as any media, files(txt, CSS, JS, others) and move it to AWS-S3. S3 is a storage server which will deal with static content it is fast reliable service to store and retrieve files.

Step 2: Replace database server with database service. AWS has a NoSQL database service called DynamoDB, which is fast, scalable database and does not require any infrastructure. If we need relational database then AWS provide Amazon Arora Serverless. Thus, both SQL/NoSQL options are available.

Step 3: AWS Lambda is the service which will be activated on trigger based, when a request is received from user Lambda code will get executed, our application code will reside in Lambda and entire application is managed using it. All Night/Cron jobs will be triggered by lambda as well.

Step 4: The request sent by user will be consumed by AWS API gateway and forwarded to respective lambda job.

In the above entire process, user will not have to provision any servers. All the process of typical application is handled by services instead of any product eliminating any server interaction. However, internally AWS might create server on their own to run their service but user will not know about its existence.

Moreover, we need to understand that not all the application will be moved to serverless architecture as many complex systems might have altogether different approach. Thus, before making any decision organization need to identify whether their application can be migrated or not.

In our subsequent blogs we will be elaborating on factors and considerations to be made while considering serverless technology

Leave a Reply

Your email address will not be published.