Serverless computing is composed of trigger-invoked functions that cut costs because they consume minimal compute resources and need neither hardware configuration, sizing nor maintenance - but what types of application are best suited for this model?
This key question might best be answered by considering another key benefit: scalability. Serverless functions can spin up in fractions of a second - triggered for example by a new product release, a response to a blog post, or a simple user request - and this means serverless functions can respond to big spikes in demand without server pre-configuration. What's more, a function can draw upon third-party resources if appropriate so, for example, a need for face recognition or flagging of inappropriate content can be satisfied by tapping into the Google Vision API.
So generic use cases revolve around applications that are asynchronous, and characterised by concurrent, unpredictable sporadic demand.
Top use cases
According to the Cloud Native Computing Foundation, of which Google is a member, the top use cases include multimedia, where processing is needed to transform data, such as image resizing, responses to IoT sensor inputs, responding to and processing data streams, scheduled batch jobs, and business logic, where microservice workloads that execute a sequence of steps need to be orchestrated.
A more concrete example is biometric authentication, which is starting to become more widespread, so image and voice recognition applications can be triggered by a request for a user's profile, such as a demand from a front-ended e-commerce system. As referred to earlier, an example can be found with the Google Vision API, which allows you to build metadata on your image catalogue. This can then be used to moderate offensive content, or to enable new marketing scenarios through image sentiment analysis.
However, this form of dynamic content manipulation may not be required. Serverless is just as suited to static content, such as scraping content from blob storage or website, making it highly economical and scalable.
Looking at more complex scenarios, if you run a bunch of batch jobs, such as backups or invoicing, you could use a serverless function to trigger events in the relevant databases, and possibly save on a number of licences that may have been required under the legacy regime. You can also make use of the capability of serverless functions to subscribe to events from SaaS applications, such as SalesForce, which then allow you to access data and activities. You can pipe data from social media chat bots to your CRM system, allowing you to enhance customer touch.
One of the positives here is that serverless allows you to experiment and start small, building up an application step by step. However, serverless is not suited to every application. For example, a compute-intensive application is likely to be cost-ineffective compared to a more traditional implementation and, because functions are stateless, serverless computing is not best suited to tightly coupled applications.
It remains early days: many business models for serverless applications have yet to be developed and released, and the effects of their interactions with traditional infrastructures has in most cases yet to be assessed. However, serverless computing delivers a quick and fairly easy way of building the types of applications that enable a business to be more agile and flexible, which fits the philosophy of business today.