Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Orchestration VS Choreography in Serverless

Orchestration VS Choreography in Serverless

In the era of microservices and serverless architecture, the choice between centralized coordination (orchestration) and distributed coordination (choreography) of services represents a crucial crossroads to ensure the coherence and efficiency of your applications. In this presentation, we will take a close look at these two strategies, highlighting their advantages and limitations. Using concrete examples, we will demonstrate how to implement both strategies using AWS serverless services, providing practical guidelines to help you make informed decisions.

Francesco Lerro

November 24, 2023
Tweet

More Decks by Francesco Lerro

Other Decks in Technology

Transcript

  1. of organizations use microservices 85% Sources: CNCF Cloud Native Survey

    2021, DORA State of DevOps 2021 reduction in mean time to recovery 60%
  2. 󰗞 I am Francesco Lerro Cloud and Serverless computing expert,

    based in Turin (Italy) Currently riding the Software Architect elevator at I love solving the Rubikʼs cube and eating buffalo mozzarella Linkedin profile
  3. Microservices collaboration A central coordinator controls the execution flow and

    the interactions between the various services ORCHESTRATION CHOREOGRAPHY Decentralised approach, each service may be asynchronously triggered by the operation of other services
  4. Design for failure On Success On Error SQS Queue DynamoDB

    For example, leveraging Lambda Destinations
  5. Use idempotency FTW! INVOCATION RETRY BEHAVIOUR API GATEWAY Synch None

    – returns error AMAZON S3 Asynch Until configured timeout, 2 times AMAZON SNS Asynch In case of unavailability DYNAMODB STREAMS Synch (from Poller) Until data expiration (24h) KINESIS Synch (from Poller) Until data expiration (24h-7d) SQS Synch (from Poller) Until retention period exp. or DLQ
  6. Coordinated transactions via AWS Step Functions Let’s start with the

    first set of slides Credits: Yan Cui, The SAGA pattern