In the past two or so years, serverless computing seems to be becoming the talk of the town. The big advantage of serverless means that you don’t have the cloud always ‘on’. Instead, you have access to on-demand serverless services, in which your third-party cloud provider fully manages code execution. Simply put, you don’t have to worry about provisioning, managing and maintaining servers when deploying code.
Unlike two years ago, serverless computing is now available from all the big names in tech. The AWS Serverless Platform, AWS Lambda, is used by the likes of Coca-Cola and other top corporations. Fujifilm uses serverless on Microsoft Azure, while PayPal and Twitter have access to serverless via Google Cloud. IBM’s OpenWhisk is another popular choice for serverless aka Function as a Service or FaaS.
Before leaping headlong into FaaS, check out some of the pros and cons of this infant technology.
You only pay for the resources you need when you use them. All costs associated with operating a server, physical or virtual are non-existent.
No infrastructure to maintain
A third-party provides servers for code execution when and where you need it, so there’s no server infrastructure to maintain.
Leading the pack here is Google’s Cloud Functions which claim automatic scaling capabilities. AWS and Azure also have infinite scalability as a top selling point.
Using serverless functions can greatly reduce any latency experienced by end users. In essence, any of a cloud provider’s servers can be used to execute a function. This means using the server closest to the user thereby significantly reducing the response time.
Less Complex Software
Serverless computing functions don’t need to consider operating systems, hardware constraints or any other functions that may impede the execution of a function. You code only needs to be supported by the third-party cloud platform.
Security is currently the most problematic area for FaaS. Security risk includes, and are not limited to insecure serverless deployment configuration, DDoS attacks, insecure third-party dependencies, and inadequate monitoring and logging of functions.
When developing and executing your code in a serverless environment, you will be locked-in to the vendor of your choice. This means that migration to another platform may be difficult and your developers will have to re-write code. That costs money!
Each time a serverless instance is created, a new version of itself is replicated. So, it becomes difficult to collect data necessary to debug and fix a serverless function. For those using AWS, debugging a serverless function is painstaking since you have to go through the code line-by-line to resolve any issues.
On AWS, execution time is 300 seconds while on Google Cloud it is 500 seconds. Also, memory on AWS is limited to 1500MB.
Remember that with FaaS, there is no local data storage. While this is a good thing, your application needs to be stateless which cab have serious limitations.
To FaaS or Not?
If your business is using high granularity, short-running tasks that have a single purpose, then serverless may be a good option for moving your IT forward. However, if your IT is such that it performs long-running computations, then steer clear of FaaS, for the moment, anyway.
Remember that there are always risks when using new technologies. Stability and lack of tools can be a problem. If in doubt about serverless computing, contact your local managed service provider (MSP). The MSP will have a wealth of knowledge and expertise to advise you on your best plan of attack for migration to a serverless state.