What to not love about serverless, I don’t see anything, there is no server to set up, no ongoing maintenance tasks required, lower costs as you pay as you go for your server. In the past few years, the servers moved from a server-room in a data center to a cloud service provider, which allow you to not invest in your own servers anymore.
I remember the days when I worked with the ops team to plan and schedule a server environment, and to get everything up and running, developers and ops people have to build a server, setup OS and network, install a variety of dependencies, capacity planning, resource planning and plan for upgrade and maintenance for years to come. That is changing very rapidly.
Going to the Cloud
We have now reached the age of the cloud service providers such as Amazon, Google, and others that are offering you to move your server room to the cloud
You can spin up your own virtual machines (VMs) without owning your own servers, don’t forget VMs are still servers, and running in the cloud does not eliminate heavy server management workload. Additionally VM deployments in the cloud require capacity planning as they are charged
Every idling core and unit of RAM are a waste of budget.
Cloud computing is all about your data center being run by someone else, and servers could be provisioned on-demand and paid for by the hour.
Serverless are servers somewhere, you aren’t responsible for the configuration and management of those servers. Serverless is pay-per-use computing where uptime is out of the developer’s control. With zero usage, there is zero cost.
If the service goes down, you are not responsible for getting it back up.The uptime is the responsibility of your cloud serverless provider.
Amazon (AWS) started the serverless movement in 2014 with a “serverless compute” platform called AWS Lambda, all the big cloud platforms now are offering their own and equivalent services like Azure Functions or Google Cloud Functions is incredibly attractive from a cost and capacity standpoint.
Serverless is all about managed services, going serverless can be scary in the beginning, there is no server to provision, no setup required, you just push your code to the serverless environment. In a serverless environment, cloud functions are the glue that stitches the cloud service providers services.
Many businesses are already using serverless, the Google G Suite environment for businesses, that is a serverless environment. In the past, a company maintained its own email server, a file server, with G Suite there is no servers to managed it’s all managed for the business.
I was recently building a proof of concept using IoT devices, I used the Google Cloud Platform for this. I used many services from the Google Cloud Platform, I used the Google Cloud Functions as the glue to pipe data to store or display depending on the requirement of the application. I used the Google Cloud IoT Core to connect the IoT sensors, the data generated by the IoT sensors are then published to the Google Cloud pub/sub and I used a Cloud function to subscribe to the Pub/Sub data to update a BigQuery table.
Serverless data cleaning
To make sure that the data that was received from the IoT sensors were consistent, I used the Google Dataprep service to read data from BigQuery, in Dataprep I created a recipe for cleaning the data before the data was stored back to BigQuery.
In also wrote a simple web app in Angular, that I launched with the Firebase Hosting and used Firebase authentication to allow for admins to sign in to view the IoT data. The web app made a BigQuery query, through a Google Cloud Function and displayed the data on the web app as two charts.
This is a very nice use case for a serverless setup, using Google Cloud Functions as the glue of stitch together cloud services through events and triggers. The time it took me to do this was in weeks, not in months/years, many of the majority of the web application features functionality – authentication, file storage, API gateway, and more – is handled by the Google Cloud Platform off-the-shelf services.
On top of taking this path, the Cloud Functions that I created – along with the remaining business logic makes the application unique, and it runs on ultra-cheap, infinitely-scalable Google Cloud Platform infrastructure, thereby eliminating the need for servers altogether.
Why do not more people use serverless, the main issue is that businesses are trying to figure out what the cloud is, many organizations are now focused on learning how to do containers in the cloud, as that enables them to take their existing paradigm, how do you deal with the migration of legacy things to the cloud.
I think the right way forward is going the serverless route rather than moving your legacy applications to work in containers, focus on re-architecting the entire legacy platform around serverless, taking the steps of evaluating each legacy application and map how that application can be done on serverless.
With a serverless environment approach, you would need fewer ops people, it would be the right time to retrain the ops people to become truly DevOps with a focus on software development and shifting your IT organization from keeping the lights on to innovation.