FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual “function”, action, or piece of business logic. They are expected to start within milliseconds and process individual requests and then the process ends.
Principles of FaaS:
- Complete abstraction of servers away from the developer
- Billing based on consumption and executions, not server instance sizes
- Services that are event-driven and instantaneously scalable
At the basic level, you could describe them as a way to run some code when a “thing” happens.
Like most things, not every app is a good fit for FaaS.
We have been looking to use them at Stackify primarily for our very high volume transactions. We have some transactions that happen hundreds of times per second. We see a lot of value in isolating that logic to a function that we can scale.
- Super high volume transactions – Isolate them and scale them
- Dynamic or burstable workloads – If you only run something once a day or month, no need to pay for a server 24/7/365
- Scheduled tasks – They are a perfect way to run a certain piece of code on a schedule
Types of Functions:
There are a lot of potential uses for functions. Below is a simple list of some common scenarios. Support and implementation for them varies by provider.
- Scheduled tasks or jobs
- Process a web request
- Process queue messages
- Run manually
These functions could also be chained together. For example, a web request could write to a queue, which is then picked up by a different function.
AWS, Microsoft Azure, and Google Cloud all provide a solution. A lot of innovation is still going on in this area and things are rapidly improving and changing. Read our article on how AWS, Azure, and Google Cloud compare to determine which cloud best meets your needs.
- AWS Lambda
- Azure Functions
- Cloud Functions
One of the big challenges is monitoring your function apps. You still need to understand how often they occur, how long they take, and potentially, why they are slow.
Since you don’t necessarily have a server or control the resources they are running on, you can’t install any monitoring software.
How we monitor these new types of apps is going to continue to evolve.
The above is a brief about Function-as-a-service. Watch this space for more updates on the latest trends in technology.