Designing a distributed application requires programmers take into account a number of operational concerns, including reliability, maintenance and overprovisioning. It necessitates a deep understanding of cloud servers and how the application must be rearchitected for its new environment. A truly serverless architecture would remove the limitations caused by containerisation and function as a service.
What is Distributed Computing?
Distributed computing is a number of disparately located components, working together to provide a single coherent software system. These components or nodes communicate by message passing – the complexity of which is hidden from end users.
We see this every day in applications as diverse as banking, social media, and streaming. Almost anything that handles vast quantities of data and large workloads will run on a distributed architecture, ensuring the necessary processing power is always on hand.
The de facto method for designing large-scale applications that tap into the cloud’s resources has become containerisation. Deconstructing and repackaging an application to run in the cloud has served as a way to circumnavigate the fact most operating systems were designed to run programs on single machines.
However, when scaling across multiple containers, processes become fragmented and it is difficult to ensure they remain strongly isolated. Although much of the orchestration can be handled by Kubernetes (or similar), the initial setup requires extensive configuration of libraries, tooling and settings, while managing highly dynamic topologies are dependent on the use of service discovery tooling. With Kubernetes, the choice is between a dizzying arrays of ‘turnkey’ solutions (each with their own tutorial and behaviours), or hosting it all yourself – with the additional burden of administering an etcd cluster, Kubernetes version upgrades and cluster scaling. Ultimately, the sheer complexity and number of processes involved impacts speed and reliability, despite the supporting ecosystem.
Containerisation also involves a number of non-essential binaries, creating security risks whereby attackers might pivot from an initial exploit to discover unprotected services. A container cannot isolate from its host O/S, so if this is breached all containers within the network are at risk.
Although containers have provided a great means of overcoming the constraints of outdated infrastructure, in reality they are an imperfect solution that add an additional layer of complexity and risk. In order to realise the full benefits of cloud-nativity, organisations must look to the next evolution of distributed computing.
The Emergence of Serverless and Function-as-a-Service
Recently, function-as-a-service (FaaS) has risen to prominence with tools such as AWS Lambda. It allows developers to run event-driven application code that scales quickly and efficiently, helping to manage costs with code only running when called and the cloud vendor takes care of any server updates and administration.
FaaS runs very well for quick one-off tasks and simple event processing, but scaling this to a full application is complex due to the lack of predictable execution and robustness guarantees within the underlying system. Moreover, the event based logic does not allow for persistence – a trade off for vendors who are thus able to easily manage the platforms and take care of all maintenance.
A Truly Serverless Paradigm
FaaS is therefore suitable for specific use cases, however running an entire application on the model becomes impractical. Regularly scheduled database tasks, CPU-bound processes and long-running persistent connections to a server are all common patterns that map poorly onto FaaS.
A truly serverless platform, by contrast, manages the configuration of all infrastructure, server management, configuration and maintenance regardless of the specific process it underpins. It takes the dynamic scaling properties of FaaS, but avoids breaking down the application into small self-contained computational units.
Computation can be considered in algorithmic or data terms, actually running the larger components within a system, rather than simply holding them together. Long running processes and fast discovery, enable services to communicate and cooperate with one another quickly and reliably.
By providing a fast lightweight alternative, serverless platforms reduce upfront costs, simplify development processes and ensure immense scalability. Programmers do not need to worry about writing complex auto-scaling algorithms, but rather these are taken care of by the platform, and the code runs much the same way in the cloud as it would on a local machine.
Ultimately, the serverless paradigm helps realise the initial promise of cloud computing, enabling true distributed program scalability, without the need for additional tooling.
To find out how Hadean enables truly serverless applications via a unique distributed process model download our architecture whitepaper.Back