Serverless Architectural Patterns

Dashbird continuously monitors and analyses your serverless applications to ensure reliability, cost and performance optimisation and alignment with the Well Architected Framework.

Product Features Start Free Trial

Video Script

In this video, we are covering Serverless architectural patterns within three categories:

  • Availability
  • Authorization
  • Orchestration

This is the “Serverless Architectural Patterns” video. My name is Renato and I welcome you to our Serverless Well-Architected series. Our purpose is to give a short overview of each pattern and cover details in the next videos.

Let’s start with the Circuit Breaker, in the Availability category. When there is an internal service and requests start to fail or slow down. Separate storage keeps track of how many issues occurred in the last 60 seconds, for example.

When there are too many failures, communication with the service is shut down to avoid overloading it. The Serverless function short-circuits to respond to API calls with an error or it falls back to a secondary backup service.

After some time, when the service performance has improved the API resumes communication and normalizes the workflow.

Other Availability patterns we will cover in the next videos are:

  • Function Warmer
  • Eventually consistent
  • Read-heavy engine

Now moving to the Orchestration category, we have the Queue-based Load Leveling pattern. This pattern can help avoid an over-loading of components that don’t scale rapidly, such as Databases.

Suppose this process receives information from various clients and stores it in a database. The serverless function backend can scale very fast but the Database cannot.

Using a queue allows keeping the database load within a certain level, regardless of how many requests the Serverless function receives.

This solution is only viable when the scale mismatch is temporary, otherwise the queue can grow indefinitely and become a bottleneck.

Other Orchestration patterns we will cover in the next videos are:

  • Fan-in/Fan-out
  • API Interfaces and all its variations
  • As well as: [c]
    • Data Lake
    • Function Chain
    • Proxy Function
    • State Machine
    • And more…

Moving into the Authorization category, this is the Gatekeeper pattern. Every request coming through an API, for example, goes through an authorizer before reaching any underlying service. This authorizer Serverless function is called “the Gatekeeper”.

This function performs identify authentication and validates whether the client is authorized to access the underlying resources. Another Authorization pattern we will cover in the next videos is the Valet Key, which solves some issues with the Gatekeeper

This video was based on a literature review published recently by a team of researchers from Finland and Italy. Go check their work to learn more about the subject.

In the next videos we will cover all Serverless patterns and dive into more details about their implementation as well as pros and cons.

No results found