The Serverless Paradigm
We are bullish about the future of serverless computing, but as yet the term is little known outside of the world of cloud computing. For this research report, Investment Analyst Imran Hossain has been digging into the world of serverless computing to explain what it means and why it matters.
In 2006, Amazon revolutionised computation as we know it with the introduction of cloud computing through Elastic Compute Cloud (EC2). The launch was a catalyst for digital transformation. By allowing users to rent virtual machines on which to run their applications, it gave small teams the advantages previously exclusive to big enterprises. This paradigm shift acted as a democratising force, allowing millions around the world to operate as modern-era entrepreneurs. The introduction of cloud removed the work required to maintain a server, thus encouraging scalable and modular deployments.
Now the paradigm has changed again. The introduction of AWS Lambda in 2014 abstracted away cloud servers. Thus begins the ‘serverless’ era.
“The European serverless ecosystem is still immature in comparison to the US, but we believe growth will accelerate rapidly in the coming years”
The rise of serverless will have a similarly transformative impact on software development, allowing a new generation of developers, innovators and creators to deploy applications far quicker and cheaper while requiring less effort to maintain. Serverless is the latest revolution in cloud computing, but its effects will be felt far more widely.
WHAT DOES SERVERLESS DO?
Just as cloud computing did not mean that data centres disappeared, ‘Serverless’ does not mean servers are removed from the equation. All the software is still running on servers, but it’s the service provider’s responsibility to handle all the underlying resources involved in provisioning and scaling a runtime environment. This allows developers to run back-end code without having to manage their server systems, maintain uptime or deal with server patching and updating.
“Serverless is the fastest-growing public cloud service with 75% annual growth”
Serverless applications have a number of key attributes: they are stateless (the server retains no information); their compute containers are event-driven (activation is triggered by specific events such as changes in users’ data); they are ephemeral (may last for one invocation), and the cloud provider fully manages them. The applications scale seamlessly and do not require any server operations.
WHY USE SERVERLESS?
Abstracting away the infrastructure relieves the developer from the operational complexity of running applications. They no longer need to worry about any of the issues related to maintaining the server.
Serverless makes horizontal scaling (i.e. scaling via the addition of more machines) completely automated and elastic. Upon invocation, the exact computational power required to complete a task is supplied to the user.
Additionally, reduced deployment complexity enables developers to iterate rapidly. The developer can quickly add bits of code to test and deploy new solutions. This also makes it possible to update, patch, fix or add new features to an application quickly. It is not necessary to make changes to the whole application; instead, developers can update it one function at a time.
For traditional servers, users have to purchase a unit of capacity, meaning they pay for an ‘always-on’ server to run their applications. Serverless, on the other hand, runs an application code only when an event triggers the activation. The service provider then dynamically allocates resources to run the code, and the user only pays for the computation required to execute the code. The ‘pay as you use’ billing model allows the user to only pay for the computation required, instead of paying for the entire machine, enabling unprecedented levels of resource optimisation.
With the increased interest in creating more agile and customisable software ecosystems, it’s not surprising that serverless has seen phenomenal growth in popularity. Research from Datadog indicates nearly half of all AWS users have adopted Lambda.
THE CHALLENGES OF SERVERLESS
However, serverless is not without its downsides. Its ephemeral and stateless nature means it cannot handle certain tasks as well as classic cloud servers.
For example, its ephemerality means applications cannot pass information from one invocation to another. However, the most pressing issue for serverless is “cold starts”. To make the service feasible, and de facto ‘only pay for the computation you use’, a provider cannot keep everyone’s code ‘warm’ and ready to serve at all times. This means that if a function has not run in a while, a pending request needs to be initialised before it is served, leading to latency issues.
Additionally, as with most new technologies, support for serverless infrastructure is still in its infancy. Monitoring and debugging serverless applications is quite tricky because of the highly distributed architecture.
THE SERVERLESS ECOSYSTEM
Despite its challenges, The serverless ecosystem is maturing at an incredible pace. Indeed, data from CBInsights indicates it is the fastest-growing public cloud service with 75% annual growth. As a consequence, startups are born every time a new hurdle for serverless is found, whether it be in initial setup to continuous monitoring post-deployment.
One prime example is Dashbird, which was born out of the necessity for better monitoring and debugging. It is a platform that tackles all the intricacies of monitoring highly distributed serverless projects. It is one of the ecosystem’s most widely used monitoring platforms.
Dashbird is not the only startup tackling serverless monitoring, and others have emerged that also facilitate the deployment of serverless software. Notable examples include Thundra, Epsagon and IOpipe.
Security can also be a concern when deploying through serverless. Misconfiguration of cloud servers and erroneous settings are the most frequent reasons for the leak of confidential information, and the architecture may make things so convenient for developers that it leads to ‘poor code hygiene’, resulting in bigger attack surfaces. These concerns led to the creation of PureSec, now acquired by PaloAlto Networks.
Some companies have found ingenious ways of mitigating the latency issues with cold starts, something that previously seemed an inherent limitation of the architecture. Cloudflare deploys serverless code to data centres across 200 cities in 95 countries; since serverless code can run from anywhere, it is possible to reduce latency by running the application on servers that are closer to the user. By doing so, Cloudflare has managed to reduce the latency due to cold start down to as little as 5ms — up to 50x faster than other platforms.
This is not to say that serverless startups emerge only as a necessity to solve issues with the architecture. The ecosystem is bustling with emerging startups taking advantage of the technology to create solutions that were not previously possible. For example, Koyeb is a startup that uses serverless to allow companies to deploy data processing workflows without having to worry about any infrastructure management, significantly streamlining the process and saving them time and money.
GIANTS GOING SERVERLESS
And it’s not just small teams or companies who can’t afford to maintain their private servers that are attracted to serverless. Netflix relies heavily on AWS Lambda to serve 7 billion hours of video to 50 million customers in 60 countries every quarter. Without this, Netflix’s platform would require significantly more computing processes and more time to build. Coca-Cola, meanwhile, began migrating to serverless in 2016.
WHERE DOES SERVERLESS GO NEXT?
Infrastructure abstraction, auto-scaling and better resource utilisation will all drive serverless adoption, but, thinking of serverless as solely a next-generation infrastructure would be short-sighted. The real opportunity is much, much more significant. Serverless could fundamentally redefine how enterprise software is distributed, consumed and monetised.
Serverless allows vendors and end-users to provide and consume software at a more granular level than ever before, opening up the possibility to distribute on a function-by-function basis. For example, a security vendor could package and deploy its malware detection software as a single function on the serverless platform, selling it for use across wildly different applications such as mobile apps, IoT devices and drones. Consumers could call just that single function, only paying for what they use.
Ultimately, we believe serverless will become a ‘state of mind’, a mentality that one takes when architecting their software. The abstraction layer provided by a serverless architecture removes extraneous work. It enables innovators to focus their time on building solutions that have a direct and tangible benefit to the user.
There will always be tasks that require the use of traditional servers. However, it is essential to realise that the goal of serverless is not to replace traditional cloud servers, but merely to bring an additional layer of flexibility and manoeuvrability to developers.
At Force Over Mass, we are always excited when a new technology comes along and fundamentally reshapes the modus operandi of developers; we believe this is one of those technologies. The European serverless ecosystem is still immature in comparison to the US, but we believe growth will accelerate rapidly in the coming years. We are keen to help fuel this growth and would encourage serverless startups who are seeking funding to reach out to us at firstname.lastname@example.org or by signing up to Flowwconnect.
• What is serverless? https://www.redhat.com/en/topics/cloud-native-apps/what-is-serverless
• Serverless inference on Kubernetes https://arxiv.org/abs/2007.07366
• The state of serverless: 6 Trends to watch https://techbeacon.com/enterprise-it/state-serverless-6-trends-watch
• How companies adopt and apply cloud-native infrastructure https://oreilly.com/radar/how-companies-adopt-and-apply-cloud-native-infrastructure/
• The state of serverless https://www.datadoghq.com/state-of-serverless/#methodology-lambda