Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
In the tech world, serverless computing is a hot topic at the moment. In fact, if you conduct a Google search, youâll come across a lot of chatter about it (significantly more than Docker containers).
But whatâs really going on here? Is the buzz surrounding serverless computing justified?
Before we answer these questions, letâs first properly define what serverless computing and Docker containers are.
Regardless of what the name suggests, serverless computing isnât actually serverless. And Docker containers donât actually contain anything. Sounds strange right? Letâs break it down even further.
Whatâs Serverless Computing?
According to TechTarget, serverless computing can be described as an event-driven application design and deployment paradigm where computing resources are offered as scalable cloud services.
This is a significant departure from traditional application deployments where the serverâs computing resources represented a recurring fixed cost. This means that you had to pay regardless of how much work was actually being performed by the server.
When you go serverless, you only pay for what you use on the cloud and you wonât be charged for any costs associated with idle or downtime. It basically operates like a function-as-a-service (FaaS) platform that enables organisations to better manage their budgets and this cost component has been its biggest selling point.
However, while youâre only paying for what you use, youâre still using a server to deploy and run your applications.
The pricing is dependent on the following parameters:
- Script duration
- Number of requests
- Memory required for the function
The total cost of ownership (TCO) of serverless computing is similar to that of virtual machines (VMs), However, with VMs, enterprises needed to keep it running before a function request was placed and that created an element of waste when capacity isnât being used.
So this approach will end up costing a lot more than serverless computing. The serverless model eliminates this issue because it can scale immediately upon a request. So once you configure the request with the function, youâre all done.
Serverless services have existed since the mid-2000s when on-demand computing solutions like the Google App Engine and Zimki emerged. However, serverless computing didnât go mainstream until Amazon launched AWS Lambda in 2014.
Since then, the competition followed suit by launching their own serverless offerings like Googleâs Cloud Functions and Azure Functions.
When it comes to adoption, New Relicâs research suggests that the adoption of serverless computing is now on the rise with 70% of enterprises now migrating a significant portion of their workloads to a public cloud with 39% using serverless computing.
According to Saurabh Bhatia, Senior Software Engineer at Airtasker, âserverless technology allows us to build event-driven pieces of code that are fully decoupled and can run out of our core system on AWS Lambda infrastructure.â
He further stated that they use serverless technology at Airtasker as âan event-based data transport mechanism that bridges various systems. We have used it for a massive extract, transform, load (ETL) migration transferring over 200 million notifications from PostgreSQL to Elasticsearch in under four hours.â
What are Docker Containers?
Docker describes containers as an approach where software is packaged into standardised units for development, shipment, and deployment. Furthermore, a container image is a stand-alone, lightweight, executable package of a piece of software which has everything it needs to run it.
This means container images will come equipped with the following:
- Code
- Runtime
- Settings
- System tools
- System libraries
Docker containers are available for both Windows and Linux based apps and the containerised software will run the same way regardless of the environment. When you use containers you can reduce conflicts between teams running different software on the same infrastructure by separating the development and staging environment.
Docker is only five years old and since it was first released as open-source software in March 2013, it has grown from strength to strength. Supported by Amazonâs EC2 Container Service that was launched the following year, Docker adoption among large enterprises is on the rise and according to New Relic, 40% are using containers, and 34% are using container orchestration (which makes it almost on par with serverless computing).
But the concept of container technology has been around much longer than serverless computing. The Docker technology we have today is also based on past container technology standards that fell off the radar.
What are the similarities?
While a lot of people often talk about serverless computing vs Docker, the two have very little in common. This is because both technologies arenât the same thing and serve a different purpose.
First, letâs go over some the common benefits:
- Minimum overhead
- High performance
- Requires minimum infrastructure provisioning
The list above is the primary reason why people are debating the benefits of AWS Lambda and Docker. However, itâs difficult to compare the two because they essentially solve different problems.
For example, serverless is better suited for new applications because itâs difficult to write to rewrite or refactor applications as sets of serverless functions. Serverless computing solutions like AWS Lambda also come with built-in restrictions on the time available for functions to run, size, and memory usage.
It can also be almost impossible to use most monitoring tools with serverless functions because thereâs no access to the container management system of the functionâs container. This will restrict you from conducting a performance analysis and make debugging a fairly primitive endeavour.
Serverless computing also demands you to keep functions small to prevent them from taking up too much of the systemâs resources. This approach is necessary to stop a relatively small number of high-demand users from overloading the system and locking everyone else out.
Serverless falls short when performance is important as the speed and response time is often uneven. This approach also has a limited list of natively supported programming languages. While itâs not necessarily intrinsic to serverless computing on a fundamental level, itâs still a reflection of the practical restraints of the system.
On the other hand, Docker container-based applications can be highly complex, large, and enabled to containerise existing applications although you will still need to engage in some serious refactoring (but not as much as what you would have to do on a serverless computing platform).
Container-based deployments also come with the added benefit of complete control over individual containers, the overall system, and the virtualised infrastructure. This enables you to better allocate and manage resources, set policies, and have enhanced control over security.
Having complete control over the Docker container environment also allows you to have an in-depth understanding of what going on both inside and outside of the containers. This makes debugging and analysis seamless as you can access a full range of resources as well as in-depth performance monitoring at all levels.
This means that you have the power to analyse each problem and tweak it on a microservice-by-microservice basis to better meet the unique performance requirements of your system. As the whole system can be monitored, itâs also easy to implement full analytics at all levels.
The origins of the serverless vs. Docker debate can be traced back to the launch of Amazon Lambda. This event essentially made the term âserverlessâ quite prominent, but the popularity of each technology can be directly attributed to each individual enterprise use case. As the adoption of serverless computing accelerated, the questions started around whether it will kill off Docker containers.
So will Serveless kill Docker?
In reality, both serverless computing and Docker work best when they are deployed to work together.
For large-scale complex applications and application suites in an enterprise or Internet environment, a container-based application thatâs combined with a full-featured system for the management and deployment of containers is the best choice.
Serverless computing is the right choice for individual tasks that can be accessed by outside services or run in the background. They work well together because Docker-based container systems can be set up to forward such tasks to serverless applications to avoid tying up the resources of the primary program.
Luke Bennett, GM Core Engineering at Telstra agrees that weâre not heading for a single solution: âWe are cognisant of vendor lock-in, and a lack of portability across cloud platforms is inherent with serverless at the moment. For enterprises embracing multi-cloud, such as Telstra, serverless wonât overtake containers in the short to medium term; and weâll see wider uptake as the serverless capabilities across cloud providers is more standardised.â
He added that âsmaller businesses and start-ups running short-lived or just-in-time functions will see benefits with serverless whilst they build their utilisation and ecosystem. Serverless and containers are complementary. Serverless abstracts out container complexity from the programming model, however, serverless cannot exist without physical machines, VMs, and containers, and forms part of the wider technology toolkit for developers to consume. As we move to a state-aware and longer running container stack, we will see the two co-exist for the respective strengths.â
Ollie Brennan, Head of Development at the Iconic further supported this approach stating that âit has taken a few iterations of technology to get to where we wanted to be. I think the biggest learning for me was that without Docker, microservices are a pipe dream. Itâs possible without it but unless you can containerise services cost quickly becomes unmanageable.â
The idea that serverless computing will kill Docker containers seems to be totally unfounded. While there might be many debates in the virtual world, container-based serverless computing will be the future.
Keep up to date with the latest insights from Australiaâs top companies in the tech space đ The Martec
Will Serverless Computing Kill Docker Containers? was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.