O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Cloud Native Development Patterns and Best Practices

Book Description

Learn to apply cloud-native patterns and practices to deliver responsive, resilient, elastic, and message-driven systems with confidence

About This Book

  • Understand the architectural patterns involved in cloud-native architectures
  • Minimize risk by evolving your monolithic applications into distributed cloud-native systems
  • Discover best practices for applying cloud-native patterns to your enterprise-level cloud applications

Who This Book Is For

This book is for developers who would like to progress into building cloud-native systems and are keen to learn the patterns involved. Basic knowledge of programming and cloud computing is required.

What You Will Learn

  • Enable massive scaling by turning your database inside out
  • Unleash flexibility via event streaming
  • Leverage polyglot persistence and cloud-native databases
  • Embrace modern continuous delivery and testing techniques
  • Minimize risk by evolving your monoliths to cloud-native
  • Apply cloud-native patterns and solve major architectural problems in cloud environment

In Detail

Build systems that leverage the benefits of the cloud and applications faster than ever before with cloud-native development. This book focuses on architectural patterns for building highly scalable cloud-native systems. You will learn how the combination of cloud, reactive principles, devops, and automation enable teams to continuously deliver innovation with confidence.

Begin by learning the core concepts that make these systems unique. You will explore foundational patterns that turn your database inside out to achieve massive scalability with cloud-native databases. You will also learn how to continuously deliver production code with confidence by shifting deployment and testing all the way to the left and implementing continuous observability in production. There's more—you will also learn how to strangle your monolith and design an evolving cloud-native system.

By the end of the book, you will have the ability to create modern cloud-native systems.

Style and approach

This book follows a pragmatic approach to understand cloud-native design patterns and explains the functioning and design considerations to build modern cloud-native systems in depth.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  2. Understanding Cloud Native Concepts
    1. Establishing the context
    2. Rewiring your software engineering brain
    3. Defining cloud-native
      1. Powered by disposable infrastructure
      2. Composed of bounded, isolated components
      3. Scales globally
      4. Embraces disposable architecture
      5. Leverages value-added cloud services
      6. Welcomes polyglot cloud
      7. Empowers self-sufficient, full-stack teams
      8. Drives cultural change
    4. Summary
  3. The Anatomy of Cloud Native Systems
    1. The cloud is the database
      1. Reactive Manifesto
      2. Turning the database inside out
      3. Bulkheads
      4. Event streaming
      5. Polyglot Persistence
      6. Cloud native database
    2. Cloud native patterns
      1. Foundation patterns
      2. Boundary patterns
      3. Control patterns
    3. Bounded isolated components
      1. Functional boundaries
        1. Bounded context
        2. Component patterns
        3. Data life cycle
        4. Single responsibility
      2. Technical isolation
        1. Regions and availability zones
        2. Components
        3. Data
        4. Accounts
        5. Providers
    4. Summary
  4. Foundation Patterns
    1. Cloud-Native Databases Per Component
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – cloud-native database trigger
    2. Event Streaming
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – stream, producer, and consumer
    3. Event Sourcing
      1. Context, problem, and forces
      2. Solution
        1. Event-First Variant
        2. Database-First Variant
      3. Resulting context
      4. Example – database-first event sourcing
    4. Data Lake
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – Data Lake consumer component
    5. Stream Circuit Breaker
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – stream processor flow control
    6. Trilateral API
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – asynchronous API documentation
      5. Example – component anatomy
    7. Summary
  5. Boundary Patterns
    1. API Gateway
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – CRUD service
    2. Command Query Responsibility Segregation (CQRS)
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – inverse oplock
      5. Example – event sourced join
    3. Offline-first database
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – offline-first counter
    4. Backend For Frontend
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – Author BFF
      5. Example – Worker BFF
      6. Example – Customer BFF
      7. Example – Manager BFF
    5. External Service Gateway
      1. Context, problem, and forces
      2. Solution
        1. Outbound communication
        2. Inbound communication
      3. Resulting context
      4. Example – user authentication integration
    6. Summary
  6. Control Patterns
    1. Event collaboration
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – order collaboration
    2. Event orchestration
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – order orchestration 
    3. Saga
      1. Context, problem, and forces
      2. Solution
      3. Resulting context
      4. Example – order collaboration with compensation
      5. Example – order orchestration with compensation
    4. Summary
  7. Deployment
    1. Decoupling deployment from release
    2. Multi-level roadmaps
      1. Release roadmaps
        1. Story mapping
      2. Deployment roadmaps
    3. Task branch workflow
    4. Deployment pipeline
      1. Modern CI/CD
      2. npm
      3. Infrastructure as Code services
      4. Serverless Framework
    5. Zero-downtime deployment
      1. Blue-green deployment
      2. Canary deployment
      3. Multi-regional deployment
      4. Feature flags
      5. Versioning
        1. Synchronous API
        2. Database schema
        3. Asynchronous API
        4. Micro-frontend
    6. Trilateral API per container
    7. Summary
  8. Testing
    1. Shifting testing to the left
    2. Test engineering
    3. Isolated testing
      1. Unit testing
      2. Component testing
    4. Transitive testing
      1. Integration testing
      2. Contract testing
      3. End-to-end testing
    5. Manual testing
    6. Example – end-to-end relay
      1. Submit order leg
      2. Order submitted leg
    7. Summary
  9. Monitoring
    1. Shifting testing to the right
    2. Key performance indicators
    3. Real and synthetic traffic
      1. Real-user monitoring
      2. Synthetic transaction monitoring
    4. Observability
      1. Measurements
      2. Work metrics
      3. Resource metrics
      4. Events
      5. Telemetry
    5. Alerting
    6. Focus on recovery
    7. Performance
    8. Summary
  10. Security
    1. Shared responsibility model
    2. Security by design
    3. Accounts as code
    4. Defense in depth
      1. Edge layer
      2. Component layer
      3. Data layer
    5. Encryption
      1. Data in transit
      2. Data at rest
      3. Envelope encryption
      4. Tokenization
      5. Domain events
    6. Disaster recovery
    7. Application security
      1. Federated identity management
      2. API gateway
      3. JWT assertion and filter patterns
    8. Regulatory compliance
    9. Summary
  11. Value Focused Migration
    1. Risk mitigation
      1. Anti-pattern – Lift and Shift
      2. Anti-pattern - synchronous anti-corruption layer
    2. Strangler pattern
      1. Bi-directional synchronization and latching
      2. Legacy change data capture
    3. Empower self-sufficient, full-stack teams
    4. Evolutionary architecture
    5. Welcome polyglot cloud
    6. Summary
  12. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think