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

Orchestration VS Choreography in Serverless

Orchestration VS Choreography in Serverless

In the world of modern application development, where distributed systems are the norm, how do you keep your applications running smoothly and efficiently? Should you opt for a central coordination approach with orchestration, or let each component handle its own tasks through choreography?

In this talk, we’ll explore these two strategies, diving into their benefits and drawbacks. Using hands-on examples with AWS serverless services, you’ll see how to implement both approaches and gain practical tips to help you decide which fits your needs best. Whether you’re new to these concepts or looking to refine your skills, you’ll leave with clear insights to guide your decision-making.

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