The Serverless pattern
The Serverless pattern abstracts server management, allowing developers to focus solely on code. Cloud providers handle the scaling and execution based on event triggers, such as HTTP requests, file uploads, or database modifications.
Figure 6.3 – The Serverless pattern
The Serverless pattern is particularly useful for Microservices, APIs, and event-driven architectures.
Real-world examples
There are several examples we can think of for the Serverless pattern. Here are some of them:
- Automated data backups: Serverless functions can be scheduled to automatically back up important data to cloud storage
- Image processing: Whenever a user uploads an image, a serverless function can automatically resize, compress, or apply filters to the image
- PDF generation for E-commerce receipts: After a purchase is made, a serverless function generates a PDF receipt and emails it to the customer