3 Architectures and patterns

 

This chapter covers

  • Use cases for serverless architectures
  • Examples of patterns and architectures

What are the use cases for serverless architectures, and what kinds of architectures and patterns are useful? We’re often asked about use cases as people learn about a serverless approach to the design of systems. We find that it’s helpful to look at how others have applied technology and what kinds of use cases, designs, and architectures they’ve produced. This chapter gives you a solid introduction to where serverless architectures are a good fit and how to think about design of serverless systems. The rest of the book focuses on real-world use cases and goes deep into a number of serverless architectures that we’ve found particularly fascinating.

3.1 Use cases

Serverless technologies and architectures can be used to build entire systems, create isolated components, or implement specific, granular tasks. The scope for use of serverless design is large, and one of its advantages is that it’s possible to use it for small and big tasks alike. We’ve designed serverless systems that power web and mobile applications for tens of thousands of users, and we’ve built simple systems to solve specific, minute problems. It’s worth remembering that serverless is not just about running code in a compute service such as Lambda. It’s also about using third-party services and APIs to cut down on the amount of work you must do.

3.1.1 Back-end compute

3.1.2 Internet of Things

3.1.3 Data processing and manipulation

3.1.4 Real-time analytics

3.1.5 Legacy API proxy

3.1.6 Scheduled services

3.1.7 Bots and skills

3.1.8 Hybrids

3.2 Patterns

3.2.1 GraphQL

3.2.2 Command pattern

3.2.3 Messaging pattern

3.2.4 Priority queue pattern

3.2.5 Fan-out pattern

3.2.6 Compute as glue

3.2.7 Pipes and filters pattern

3.3 Summary