Serverless: Main Advantages and Disadvantages, Serverless
Formerly, developers had to take the responsibility of servers when developing their applications. To run their applications on these servers, developers had to implement, maintain, update and continuously monitor the infrastructure. Although cloud computing have changed the way of setting up the infrastructure, developers are still responsible for the maintenance of it. For example when choosing the amount to rent, excessive server space is rented to ensure that an unexpected traffic or peak times wouldn’t break the application. Although auto-scale features are served by cloud vendors, there are still risks of over payment, for example a DDoS Attack would mean an extreme scaling and eventually a very huge cost. Developers must manage the infrastructure effectively. This leads to a lot more work for developers, taking their attention from the business goals and application itself.
That is where “serverless” comes in. Serverless computing is an execution model where the cloud vendor takes the responsibility of resource allocation. Serverless allows developers to shift operational concerns and whole infrastructure management to cloud vendors. In serverless architecture, cloud vendor provides backend services when needed.
Microservices and Serverless
Microservices is an architectural pattern, which is based on building separated individual services that makes one job really well. With this pattern, developers can develop services that are not dependent on each other, each service can scale independently and build much more flexible fault tolerant systems.
Before serverless, microservices were managed and deployed on containers. Containers are form of virtualized operating systems, which are isolated from each others’ context. Even though environments are separated, each service that are deployed to containers must be monitored and scaled if needed. With serverless in game, these worries are now gone. Because there are no servers or containers to be maintained, developers deploy their services to serverless, sit back and watch their code run without any worries.
Advantages of Serverless
Thanks to serverless, developers don’t need to worry about anything but the application itself. The provision issues before the development and maintenance of servers afterwards, they are handled by cloud vendors, not by DevOps teams.
Since no provision is needed, developers or DevOps teams don’t have to pre-rent excessive server spaces. The cloud vendors are responsible for resource allocation and the pricing is based on the number of executions.
While the resource allocation means lower operational costs, it also reduces effort needed. Developers don’t have to think about peak traffic or downtime issues.
Backend as a Service (BaaS) means that the servers are provided through cloud system. This helps to distribute servers to different geographic areas. Since no fixed server is rented and servers work on demand only, it is possible to run the code closer to end user. At the end of the day, latency decreases and end user experience improves.
Since less provision is needed and deployable units are smaller, it becomes faster and easier to have a business idea and make it happen through deployment. With serverless, teams can focus on their product only, and this leads to much more time for updates and product features. In the end, serverless helps companies to gain competitive edge due to ability to innovate.
Disadvantages of Serverless
In serverless, the codes are held in storage. When a request comes, the code is brought up and then it starts working. Only thereafter the response is sent. This process is called “cold start” and it can take a lot time. When no additional requests come in a certain time, the server becomes inactive again and the same process of cold start happens when next request comes. The duration of cold starts varies between different cloud vendors, however it is too slow when compared to warm starts.
If the application is always working, then serverless works as if a rented server. If the server is up 24/7, then the cost per execution exceeds the rent prices. This causes even higher cost than rented server systems.
Limited Working Times
Limited working times may become a disadvantage when working with serverless. There is a time limit for the code to run after a request comes. Thus, if the time limit is exceeded, the code stops execution, the request is cancelled and the system raises an error. This problem may decelerate the business due to nonresponses.
If you are interested in serverless world and serverless technologies, you can join ServerlessDays community. ServerlessDays is an event group across the world which support community around serverless technologies. With this community, you can explore this technology further and also learn from industry experts.
ServerlessDays İstanbul is coming!
ServerlessDays first began as JeffConf, making a reference to Paul Johnston’s description of serverless technology: “Serverless is just a name. We could have called it Jeff”. These events aim to extend the know-how and skill set, share experience and support the community. Each event is organized locally, and the main standard of these events are accessibility and representability. It is a day-long, single track event. ServerlessDays are organized at many cities across the world, from Melbourne to Toronto.
As image4io, we are so happy to be a silver sponsor of ServerlessDays İstanbul 2019. ServerlessDays İstanbul will be held on Thursday, October 3rd in İstanbul Kadir Has University. We welcome anyone interested in serverless world!
For event details and tickets, please visit: ServerlessDays İstanbul 2019