Recently, we introduced the key concepts behind Serverless Architecture and the types you can find . Now, we want to go a bit deeper into the main advantages and problems that someone might face when deciding to adopt this technology.
A few weeks ago we shared a post about what Serverless Arquitecture means and how this term, even though it has been around for a while, still has a lot of skepticism in the industry. But the truth is that this term is changing from being a buzzword to becoming a reality that must be seriously considered in any new project.
Now, after seeing those facts, what are the advantages and drawbacks that Serverless Architecture has? Keep reading to find out .
Strengths of Serverless Architecture
There are three main benefits when working with Serverless Architecture. Among its strengths we can highlight the following:
1. Truly automatic scalability
The Serverless Architecture is inherently distributed and allows for real automatic scalability. The main reason why the computations scale well is due to the constraints that they must follow in order to work with this kind of architecture.
A FaaS system consists exclusively of functions with strict conditions about its inputs and outputs. There is no state preserved between function calls. These kinds of computations are easier to express following a functional programming paradigm. The functional paradigm has been around for decades and has set the foundations of the computational era.
With the advent of Cloud Computing and the possibility of quickly building applications that reach millions of users, the paradigm has resurged and is currently an essential part of many frameworks for this kind of architecture.
Content related: PaaS and IaaS… Where is Cloud Computing leading us?
2. Lower operational costs
Having automatic scalability means less resources designated to maintain and configure instances behind a load balancer. However, that is just one aspect of operations. Having to build and deploy complex software requires people to maintain and configure the development, QA and production environments, configuration and maintenance of Continuous Integration, and database servers. Leveraging all these aspects to the Cloud provider dramatically reduces the costs.
This same reduction of costs has been present since PaaS has existed. The added value of Serverless Architecture is that you do not even have to think about how many requests your site will handle, imposing quotas to each of the components, or even planning in advance to buy more than the actual needed resources, predicting that there will be some spikes in the usage of the system.
Having such a fine granularity in the cost calculated, in terms of functions calls, allows you to pay exactly for what you use. No more, no less.
3. Reducing time to market
If it takes a year to try an idea, when such an idea is actually implemented, you may lose an opportunity. Having a reduction in operational costs, added to the ability to build and deploy applications faster, auto-scaling to millions of users, brings the possibility to test and experiment with different solutions for the market in some scenarios where in the past it was not possible.
The competitive advantage in emerging and existing markets is huge, and it may be one of the key reasons why some companies decide to go Serverless.
And… What about the weaknesses?
There is a lot of enthusiasm with the ideas behind Serverless Architecture. However, as it has been demonstrated with every new concept in software development, there is no silver bullet.
Considering a Serverless Architecture for your system may be conditioned for several factors:
1. Support for legacy systems
The Serverless platform requires you to build all systems from the ground up to work in a microservices style. This does not play well maintaining and extending functionality of an existing large codebase. In all cases, while software components could be migrated or updated to the new architecture in a gradual manner, the monolithic database would be the main obstacle to change to a fully distributed and Serverless environment.
In all scenarios, the key before moving to microservices and later Serverless Architecture, is to carefully determine if the business domain and the existing requirements require this type of solution. For example, in most cases where horizontal scalability is not an issue and your company does not need to support quick changes and adaptations to a changing market, the answer will simply be “No”.
2. A higher level of expertise
The Serverless Architecture presents several challenges in the design, development, testing, and optimization of the system.
Performance is one of the principal concerns. This architecture introduces several additional calls to resolve a single functionality. When you are building a service that interacts with several other functions to solve a problem, you cannot assume that those other functions will be executed locally. This is a challenge at the moment for designing services with this kind of constraint in mind.
Since everything is potentially remote, the typical optimizations to solve performance issues are harder to implement and require a detailed analysis of the services involved.
Also, testing and debugging will become harder in some aspects. Due to the distributed nature of these architectures, a bug may cross the boundaries of a service and its effect may appear far away from its root cause. It requires a deep understanding of all the components interacting in the system to detect and solve an issue. Although QA and automatic unit testing is a must for any kind of project, it becomes a key concern in a Serverless environment.
3. Vendor Lock-in
Since the architecture relies on delegating most of the back end logic to the Cloud in order to benefit from the automatic infrastructure and scalability, we end up depending on the third-party APIs that those external vendors provide.
There is no standardized API for any of the existing Serverless providers, and it is very unlikely that we are going to see something like that in the near future. Although one can create the extra layers of abstractions that permit a system to migrate from one vendor to another, in most cases, the effort required to do so will go against the reduction of costs that such technology is providing as a benefit.
This type of architecture is still in its earlier stages, and although it has the support of big companies such as Amazon or Microsoft, the options are still limited and the conventions and methodologies are still under development. This implies that you would need to work out your custom policies and guidelines adapted to your business domain.
To Sum Up
Serverless systems are foreseen as the future of Cloud computing . However, as it happens with every emerging technology, it will take some time to be considered as the right solution for every organization. Its main benefits do not come for free, and every organization must carefully study and analyze the impact of migrating or building a new system based on this approach.
Hexacta counts on specialists in all aspects of software development , and we can provide you not only with highly qualified software developers but also a cross-functional team of architects and functional analysts that can evaluate your needs to determine if this approach would work for your business .
As part of the work of our I+D team, we have been involved in the emerging technologies behind Serverless since its inception, working on both Java and .NET stack on Amazon AWS and Microsoft Azure platforms, respectively.
If you want to learn more about the possibilities of applying microservices/Serverless Architecture to your company or project, Contact us and we will be glad to help you.