Virtual machines powered the original revolution in the cloud. However, the serverless revolution will be even bigger.
Remember when it used to take weeks to deploy a new application? You had to requisition new hardware, wait for its arrival, install an OS, setup a Rack, and plug it into your data center. In most cases this meant waiting for your IT team and getting approval from several layers of management. You could put in a request for hardware, go on an extended vacation, and come back to find nothing was done.
Much of this tedium was done away with Virtual Machine technology. Now, with a single click you can provision and launch a “machine” that was preconfigured with all the necessary software and settings. New applications could be deployed in less than an hour. With deployment automation, today you can even have an entire stack (multiple applications, databases, and network configurations) setup and deployed in minutes!
I have long believed that cloud computing would come to a cyclical end as Peter Levine of Andreesen Horowitz argued in his End of Cloud Computing presentation. However, I now believe that future will be forestalled indefinitely by serverless computing.
In his presentation, Peter rightly argues that edge computing requirements of Autonomous Vehicles, Robots, and other IoT devices will push cloud tech down to the edge. For these devices, the network latency associated with a cloud request could be detrimental. They are essentially “mobile data centers.” Initially, this level of compute power would be expensive, but with mass production the unit cost will be driven down. In all likelihood, these edge computing devices will outnumber human beings on several orders of magnitude.
The picture Peter paints goes awry by assuming cloud companies won’t adopt these very machines and that most edge devices will require sub-millisecond response times. Some class of computing will evolve as Peter predicts, but I believe the cloud is about to take its biggest leap with serverless tech. In this future, compute power will most closely resemble electricity or a commodity exchange.
A Server is any application that listens for requests over the network and performs some action in response to the request. For example, a Database Server listens for requests concerning the manipulation and querying of data. Such a database at a high level might have the following set of functions:
In a low concurrency or small data scenario, you will have at least one such server and a failover server running all the time. While in a high concurrency or big data scenario, you might have 100’s of servers running all the time. These servers must be running all the time to ensure fast responses. As traffic spikes additional machines are added to the pool to handle the increased load.
I use machine and server interchangeably here to represent a single virtual machine instance where the database server is installed and running.
This is where things start to get expensive in the cloud. In almost every environment, you will find excess capacity.
Adding a new machine to the pool could take between 5 mins and 30 mins or even longer in some cases. To counteract this delay, you will over-provision the required capacity. Even more frustratingly, peak utilization across all machines may only last a fraction of the hour. For example, a sudden surge in “Update Data” requests cause activity on all your provisioned machines, but the spike only lasts 5 minutes. You still have to pay for the entire hour!
In a serverless application, each function is unbundled and served independently. You can think of each function as a micro-server.
Like a deconstructed Samosa, each component is directly accessible. This means each function can scale independently only consuming the resources necessary for its operation. Resources allocated by a traditional Server, on the other hand, will be dictated by its hungriest function. For example, your traditional server runs a cleanup function every 2 hours that requires 128GB of memory and runs for 10 minutes. This means you have to allocate a machine with at least 128GB of memory leading to 12 hours of excess capacity per day.
The most compelling promise of the serverless paradigm is its potential to allocate compute resources more precisely.
You see, cloud vendors like Amazon, Google, and MicroSoft are creating serverless platforms where scaling and running your functions are fully managed. You no longer have a monolithic server idling and costing you money. Instead, resources are allocated in real-time as requests for your functions are made. In this paradigm, our cleanup function will only allocate resources every 2 hours with zero excess capacity. We get to pay the true cost of running this function!
What all of this means is that computing is about to get a whole lot cheaper. Like electricity, you only pay for what your applications actually consume.
We recently converted a custom data ingestion application for a client of ours from a server based one to a serverless backend. We saw a 5x improvement in performance and a 100x drop in price! So impressed by this finding, we decided to pivot our startup and launch Lodr.io, a serverless data loader for Amazon Redshift. Besides the beautiful UI and the many wonderful features, what customers will find most compelling would be the price. (Stay tuned!)
Any new paradigm or piece of technology will have growing pains before its full potential is realized. One of the biggest for us so far was the hard limits on execution duration imposed by Amazon’s serverless platform called Lambda. We will elaborate on this issue and more in other posts, but let’s take a moment to prognosticate.
With this level of precise allocation of a resource, compute in this case, there will come a time when an exchange will be necessary. Your functions will be deployed on every cloud platform and the exchange will direct traffic to those functions based on price in real-time. The price, of course, will be dictated by supply and demand. The compute grid will arrive before the smart electric grid and the cyclical end of cloud computing will be put off by several decades.
Let’s see how this prediction holds up.
This article was also shared on lodr.io.
Serial entrepreneur, founder of Vero Analytics and lodr.io. Previously big data Manager @ Netflix. Accessible on twitter @ajoabraham