Serverless Computing: Is it for you?
Let’s start by accepting that the term Serverless itself is a bit of a misnomer. Without a server there really can’t be any computing. What Serverless Computing does is, hide the server from you, take away the hassle of maintaining hardware and software, and give you all the computing muscle you need, without any idle capacity.
In a traditional IT environment, i.e. server-based, you typically have a 3-tier architecture, viz: a database layer, where the database sits; an application layer, where your apps run; and the presentation layer, interface users interact with. A user can thus interact with your application in as many ways as your application will support—a web browser, mobile, or connected device (think: IoT)
What this means is that before you even start working on your (server-based) app, the onus is on you to set up your server, install the OS, install needed software; and regularly manage all this, i.e. take care of hardware, update software, manage operating systems. Don’t forget, you also need to ensure your application is always available; this means installing load balancers and managing the whole set up. The costs mount up quickly and they never stop.
With Serverless Computing you can do away with all this completely, and focus on writing your application code, with everything that involves. You don’t need to bother about buying and updating hardware, maintaining servers, managing operating systems, installing or updating software to manage. What’s more, you never need to worry about under-provisioning or for that matter over-provisioning. Your applications will enjoy high availability, and fault-tolerance by default. So you’re free to concentrate on working on your core application logic and building your application knowing neither scalability nor provisioning, will pose a problem. Ever.
Serverless Computing Benefits
- No server management needed: no OS, no software upgrades, no hardware maintenance
- No system admin needed
- Auto-scaling, i.e. no need to create an architecture to handle scaling
- High availability and fault tolerance
- No idle capacity—you only pay for what you use.
When you compare this cost with a traditional IT setup, it quickly becomes clear how much you save. For instance: Assume you have a server configured for 100 GB of memory and you’re using only 5 GB. You, nevertheless, are still liable to pay for the 95 GB that’s sitting idle. Thus, serverless architecture frees you from paying for idle resources: Use 5 GB, and you only need to pay for 5 GB.
AWS Lambda scores high in this department, charging you by the millisecond: the moment your function ceases to run, your meter stops. Say your code runs for 100 milliseconds; you’re charged for this much and no more. The savings can be substantial.
A Word of Caution: Serverless Disadvantages
It’s not all roses though, serverless does have its drawbacks.
- Not suitable for long-running applications: Long tasks are usually cheaper to run on a dedicated server or VM
- Vendor lock-in: This is an often-overlooked rider and it can hamstring a business, as many have found out too late. Since your application is dependent on an external provider, you have less control over your app. Lack of compatibility means you can’t easily shift to a different platform or provider without expensive changes to your application.
- No local calls: If your functions need to communicate, be prepared for additional overhead, as most serverless architectures will charge for microservice calls. There is simply no way to know whether or not the functions in question are located on the same server.
- Multi-tenancy: With the software of several disparate customers regularly being run on the same physical server, your application performance can be affected by failure or bugs in another customer’s code. This is especially significant if your application deals with sensitive data.
- Cold start: Before handling first requests, the platform needs time to activate internal resources—start a container, for instance. For functions that lie idle for extended time periods, this could be a problem. One way to avoid this is to send regular requests to keep your function from going ‘cold’.
- Testing tools: If your provider doesn’t provide tools to test functions locally, you will end up paying for each function.
In a nutshell
While serverless doesn’t lend itself to some situations, such as long tasks, and there can be security concerns, and you need to be aware of vendor lock-ins, serverless architecture is nevertheless redefining the way applications are written and developed, freeing developers to focus solely on code.
Third-party services, such as AWS Lambda can help you do away with the need to set up and configure physical resources, and with billing on a milli-second basis, your savings can be substantial.
Still not sure if serverless is for you? TeleGlobal can help. As independent providers, and experts with AWS, Azure, GCP, and a few more, we can advise on feasibility and help you take the next step towards digital transformation through efficient, agile, and cost-effective serverless architecture.