
Function as a Service (FaaS), or serverless computing, gives you the option to purchase backend services from a vendor for your cloud applications rather than deploying and maintaining servers of your own. You divide your application into “functions,” which are parts of your application that are triggered by specific events. You can then upload the functions onto the vendor’s FaaS platform and attach the event source.
Eliminating on-premises servers can provide substantial benefits to a software company, but FaaS advantages don’t stop there. Consider the impact FaaS could make on your business in these areas as well:
- Costs: Typically, you only pay for the service you use. You don’t have to pay in advance for a specific amount of bandwidth as you would with vendors using a server allocation model.
- Easy scalability: Applications built on FaaS platforms scale automatically with the number of users or usage. The vendor, not the developer, manages scaling.
- Simplified code: With FaaS, you have the option to upload one function at a time or your entire application all at once. FaaS also gives you the freedom to write backend code for independent functions, similar to microservices.
- Decreased latency: The FaaS vendor may have the capability to run applications closer to end users, eliminating the need for requests to travel long distances to an origin server.
- Faster time to market: Function as a Service supports iterative development, getting applications up and running sooner, and allows you to make modifications more easily.
Trade-Offs You May Need to Make to Use FaaS
There is a potential downside to using Function as a Service. Some of the things you need to consider before you go all-in with FaaS include:
- Vendor lock-in: Building your application on a FaaS platform may make you reliant on that vendor and make it difficult to switch.
- Testing hurdles: Depending on the vendor, you may have challenges when creating a test environment for your application.
- Cold starts: There’s sometimes a delay in the execution of a function, as much as 3 seconds, which can adversely impact some types of applications.
- Security: You are at the vendor’s mercy when it comes to security and may not have the visibility you need to ensure the vendor complies with regulations governing your use or storage of certain types of data.
- Cost: This item is repeated from the benefits list, but in some cases, FaaS can actually cost more than using dedicated servers, depending on the processes you are running.
FaaS or Containers?
Your only options aren’t on-site servers, allocating space in a server farm or FaaS. You also have the option of containerized applications or microservices. You can move containers that include your application and everything it needs to run, as needed, and manage them with Kubernetes. In most cases, FaaS is more cost-effective and scalable, but containers, which run the same way regardless of where they are deployed, are easier to test and aren’t dependent on a specific vendor’s platform. Containers may also be the best choice for migrating legacy applications to the cloud.
It’s also important to realize that the architecture you choose doesn’t have to be all or nothing. It’s possible to have some functions on FaaS and others in containers. Your skills as an innovator and a developer can also help you determine the best way to manage your applications. FaaS or a hybrid solution may be the best course.