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

Lift & Shift, Cut Overs, and other Bad Habits

Lift & Shift, Cut Overs, and other Bad Habits

The last time you moved, you had that box. You haven’t opened it in years. You still haven’t opened it but you carry it around with you like a treasured keepsake. Unfortunately, we moved to the cloud the same way. We brought all of our habits, practices, and patterns without considering which may be strengths or weaknesses.

In this session, we’ll skip the tools and take a look at our new constraints and capabilities the cloud gives us. Through this, we’ll explore three architectural Cloud Design Patterns - Circuit Breaker, the Strangler, and Pub/Sub - to make our systems more reliable, more maintainable, and probably cheaper to run.

Keith Casey

January 29, 2024
Tweet

More Decks by Keith Casey

Other Decks in Technology

Transcript

  1. Agenda - Intro - What are Design Patterns? - Rethinking

    for the Cloud - Strangler - Publisher/Subscriber - Circuit Breaker - Next Steps
  2. 7 7 7 A way to express a complex solution

    to a problem in a simple, repeatable way We do this in many areas - Goldilocks - Catch 22 - Kobayashi Maru What is a Design Pattern?
  3. Types of Design Patterns Creational Structural Behavioral Scope Class Factory

    Adapter Interpreter Object Abstract Factory Adapter Chain of Responsibility Builder Bridge Command Prototype Composite Iterator Singleton Decorator Mediator Facade Observer Flyweight Strategy Proxy Visitor
  4. 10 10 10 The Old World - Direct access to

    systems - 3-tier architecture (presentation, app, data) - Simple request/response - Local request/response - Potentially single server - Predictable components & configurations - Complete control over the stack The New(ish) World - DevOps and Build pipelines - Microservices - Distributed systems - Ephemeral systems - Scalable, unpredictable architecture - Predictable configurations - Minimal control for developers Why they break down
  5. 20 20 20 - Microservices - Distributed Logging - Federated

    Identity - Load Balancing - Promises - Service Discovery - Service Mesh - Sidecars - Mock Objects - Work Objects What’s out of bounds this time?
  6. 22 22 22 “If you know the problem and know

    yourself, you need not fear the result of a hundred releases. If you know yourself but not the problem, for every release you will also suffer downtime. If you know neither the problem nor yourself, you will break everything and have no flippin’ clue why.” ~ Sun Tzu Some Wisdom
  7. What problem do we have? We have an old system

    We want to have a new system The old system has to keep working
  8. What does this pattern do? Old System Facade Old System

    Old System Old Facade New Old Facade New New System Facade
  9. When do we use it? The old system has to

    keep working We want to separate/isolate components Great for testing high risk components Ref: https://martinfowler.com/bliki/StranglerFigApplication.html
  10. Do you have a single point of entry/control? Now you

    have to maintain the facade too! Can the facade keep up with the changes? Is the facade a single point of failure? Can both systems handle data jointly? What are the tradeoffs?
  11. We have distributed components that need to interact We may

    not have a list of every listener Not every listener cares about every message What problem do we have?
  12. When do we use it? We have distributed, event-driven systems

    We don’t have control over the endpoints We have varied architectures, languages, etc Our listeners are scaling quickly or are ephemeral
  13. What are the tradeoffs? Security - there are many ways

    to screw this up This is a broadcast-only, not bi-directional Messages will be received out of order Messages can be lost or repeated Can you replay messages?
  14. What problem do we have? Things break! Things come back!

    We have to protect our app and users
  15. Protects the system but cutting off - or breaking -

    connectivity to other systems Optionally: Provide a fallback option Optionally: Monitor the underlying system and recover automatically once it’s restored What does this pattern do? Ref: https://martinfowler.com/bliki/CircuitBreaker.html
  16. Any time we want to isolate a dependency/subsystem AND Our

    system can be “useful enough” without the subsystem When do we use it?
  17. Ref: https://aws.amazon.com/blogs/compute/using-the-circuit-breaker-pattern-with-aws-step-functions-and-amazon-dynamodb/ What are the tradeoffs? How do we handle

    the exceptions? How do we trigger a reset/recovery? How do we test success, failure, and the transition states? Some things should knock our systems offline
  18. - Design Patterns - complex ideas in simple repeatable explanations

    - Rethinking for the Cloud - our constraints have changed - Strangler - replace an old system safely over time - Publisher/Subscriber - communicate between distributed systems - Circuit Breaker - protect your system & recover from failures Recap
  19. 44 44 44 - Microservices - Distributed Logging - Federated

    Identity - Load Balancing - Promises - Service Discovery - Service Mesh - Sidecars - Mock Objects - Work Objects Other Cloud Design Patterns
  20. 45 45 45 Where can I learn more? - Martin

    Fowler’s Patterns of Legacy Displacement - Microsoft’s Azure Architecture Center - PHP: Design Patterns on LinkedIn - webhooks.fyi - In progress: DesignPatterns.fyi