![Design Microservices Architecture with Patterns and Principles [Video]](https://content.packt.com/V21138/cover_image_small.jpg)
Design Microservices Architecture with Patterns and Principles [Video]
Subscription
FREE
Video + Subscription
$29.99
Video
$99.99
What do you get with a Packt Subscription?
What do you get with a Packt Subscription?
What do you get with Video + Subscription?
What do you get with a Packt Subscription?
What do you get with eBook?
What do I get with Print?
What do I get with Print?
What do you get with video?
What do you get with Audiobook?
Subscription
FREE
Video + Subscription
$29.99
Video
$99.99
What do you get with a Packt Subscription?
What do you get with a Packt Subscription?
What do you get with Video + Subscription?
What do you get with a Packt Subscription?
What do you get with eBook?
What do I get with Print?
What do I get with Print?
What do you get with video?
What do you get with Audiobook?
-
Free ChapterCourse Introduction
-
Understand E-Commerce Domain
-
Monolithic Architecture
- Introduction - Monolithic Architecture
- When to Use Monolithic Architecture
- Benefits of Monolithic Architecture
- Challenges of Monolithic Architecture
- Design Principles of Monolithic Architecture -- KISS, YAGNI, DRY
- Design the Architecture - E-Commerce App - KISS and YAGNI
- Design and Iterate Monolithic Architecture - E-Commerce Application
- Evaluate Monolithic Architecture - E-Commerce Application
- Problem: Code Becomes Too Complex over Time - Monolithic Architecture - E-Commerce
-
Layered (N-Layer) Architecture
- Layered (N-Layer) Architecture
- Design Principles - Separation of Concerns (SoC)
- Design principles - SOLID
- Design the Architecture - E-Commerce App - Layered Architecture
- Adapt Technology Stack - E-Commerce App - Layered Architecture
- Demo: Layered Monolithic Architecture Code Review - E-Commerce App
- Evaluate Layered Monolithic Architecture
- Problem: Highly Coupling Dependent Layers
-
Clean Architecture
- Introduction the Clean Architecture
- What Is Clean Architecture?
- The Dependency Rule
- Layers of Clean Architecture
- Benefits of Clean Architecture
- Design the Architecture - Clean Architecture - E-Commerce App
- Adapt Clean Architecture - E-Commerce App
- Demo: Clean Architecture Code Review - E-Commerce App
- Evaluate Clean Architecture
- Problem: Increased Traffic, Handle More Requests
-
Scalability - Vertical Scaling - Horizontal Scaling
- Introduction Scalability - Why We Need to Scale
- Scalability - Vertical Scaling - Horizontal Scaling
- Vertical Scaling - Scale Up
- Horizontal Scaling - Scale Out
- What Is Load Balancer? Use Load Balancer to Split the Load with Consistent Hashing
- Design the Architecture - Scalability - E-Commerce App
- Adapt the Architecture - Scalability - Load Balancer - E-Commerce App
- Evaluate: Clean Architecture with Scalability - Load Balancer - E-Commerce App
- Problem: Agility of New Features, Split Agile Teams
-
Modular Monolithic Architecture
- Introduction - Modular Monolithic Architecture
- What Is Modular Monolithic Architecture?
- Benefits of Modular Monolithic Architecture
- Challenges of Modular Monolithic Architecture
- When to Use Modular Monolithic Architecture
- Monolith First Approaches from Martin Fowler and Sam Newman
- Monolithic Architecture Vertical Considerations, Communications of Monolithic
- Transaction Management of Monolithic Architecture
- Deployments of Monolithic Architecture
- Design the Architecture - Modular Monolithic Architecture - E-Commerce App
- Evaluate: Complexity of Presentation UI Operations- Modular Monolithic Architect
- Problem: Improved customer experience with Separated UI and Omnichannel
- Headless Architecture and Separated Presentation with SPA
- Design the Architecture - Modular Monolithic Architecture with SPA - Separated UI
- Adapt the Architecture - Modular Monolithic Architecture with SPA - Separated UI
- DEMO: Modular Monolithic Architecture Code Review - E-Commerce App
- Evaluate: Modular Monolithic Architecture with SPA
- Problem: Agility of New Features, Split Agile Teams
-
Microservices Architecture
- Introduction - Microservices Architecture
- What Are Microservices?
- What Is Microservices Architecture?
- Microservices Characteristics
- Benefits of Microservices Architecture
- Challenges of Microservices Architecture
- When to Use Microservices Architecture - Best Practices
- When Not to Use Microservices - Anti-Patterns of Microservices
- Monolithic Versus Microservices Architecture Comparison
- The Database-Per-Service Pattern - Polyglot Persistence
- Design the Architecture - Microservices Architecture - First Iteration
- Adapt the Architecture - Microservices Architecture - First Iteration
- Evaluate: Microservices Architecture - First Iteration
- Problem: Break Down Application into Microservices
-
Decomposition of Microservices Architecture
- Introduction - Decomposition of Microservices Architecture
- Why Do We Need to Decompose? - The Scale Cube
- Microservices Decomposition Pattern - Decompose by Business Capability
- Microservices Decomposition Pattern - Decompose by Subdomain
- Bounded Context Pattern (Domain-Driven Design - DDD)
- Identify Bounded Context Boundaries for Each Microservices
- Using Domain Analysis to Model Microservices and Checklist after Decomposition
- Analysis E-Commerce Domain - Use Cases
- Analysis E-Commerce Domain - Nouns and Verbs
- Identifying and Decomposing Microservices for E-Commerce Domain
- Design and Adapt Microservices Architecture with Decomposition Patterns
- Evaluate and Problem Microservices Architecture and Client-Service Communication
-
Microservices Communications - The Basics
- Introduction - Microservices Communications - The Basics
- What Is Changed for Communications Between Monolithic to Microservices
- Microservices Communication Types - Synchronous or Asynchronous Communication
- Microservices Communication Styles Request-Driven or Event-Driven Architecture
- Microservices Synchronous Communications and Best Practices
- Designing HTTP-Based RESTful APIs for Microservices
- RESTful API Design for Microservices
- RESTful API Design for Single Microservices
- RESTful API Design for E-Commerce Microservices
- API Versioning in Microservices RESTful APIs
- Design Microservices Architecture with RESTful API Design
- Evaluate: Microservices Architecture with RESTful API Design
- Problem: Multiple Request (N+1) for Retrieving Relational Data
- Graph: QLA Query Language for APIs
- Graph: QL Core Concepts, Schemas, Queries, Mutations, and Resolvers
- Advantages and Disadvantages of GraphQL
- REST Versus GraphQL APIs
- Fetching Data with REST and GraphQL
- Design and Evaluate: Microservices Architecture with GraphQL API Design
- Problem: Inter-Service Communication Makes Heavy Load on Network Traffic
- gRPC: High Performance Remote Procedure Calls
- How gRPC Works
- Main Advantages of gRPC
- When to Use gRPC? Use Cases of gRPC
- gRPC Usage in Microservices Communication
- Design and Evaluate Microservices Architecture with gRPC API Design
- Problem: Chat with Support Agent to Answer Customer Queries
- WebSocket API Real-Time Two-Way Communications
- When to Use WebSocket API and Use Cases of WebSocket API
- Design and Evaluate Microservices Architecture with WebSocket API Design
- Problem: Direct Client-to-Service Communication
-
Microservices Communication Patterns - API Gateways
- Introduction: Microservices Communication Patterns - API Gateways
- Problems of Direct-to-Microservices Communication
- Why Should We Use API Gateway?
- The Solution - API Gateway Patterns
- Gateway Routing pattern
- Gateway Aggregation Pattern
- Gateway Offloading Pattern
- API Gateway Pattern
- Main Features of API Gateway Pattern
- A Request Flow of API Gateway Pattern
- Design and Evaluate: Microservices Architecture with API Gateway Design
- Problem: Client Apps Have Different UI Requirements
- Backends for Frontends Pattern-BFF
- Design and Evaluate: Microservices Architecture with Backends for Frontend Pattern
- Service-to-Service Communications Between Backend Internal Microservices
- Service-to-Service Communications Chain Queries
- Problem: Service-to-Service Communications Chain Queries
- Service Aggregator Pattern - Microservices Communications Design patterns
- Service Registry/Discovery Pattern - Microservices Communications Design pattern
- Design and Evaluate: Microservices Architecture with Service Aggregator, Registry
- Adapt the Architecture - Microservices Architecture - Second Iteration
- Problem: Long Running Operations Can't Handle Sync Communication
-
Microservices Asynchronous Message-Based Communication
- Introduction - Microservices Asynchronous Message-Based Communication
- Microservices Asynchronous Communication
- Benefits of Asynchronous Communication
- Challenges of Asynchronous Communication
- Asynchronous Message-Based Communication Types in Microservices Architecture
- Single-Receiver Message-Based Communication (One-to-One Model-Queue)
- Multiple-Receiver Message-Based Communication (One-to-Many Model-Topic)
- Design Principles - Dependency Inversion Principles (DIP)
- Fan-Out Publish/Subscribe Messaging Pattern
- Topic-Queue Chaining and Load Balancing Pattern
- Design Microservices Architecture with Fan-Out Publish/Subscribe Messaging
- Adapt: Microservices Architecture with Fan-Out Publish/Subscribe Messaging
- Evaluate: Microservices Architecture with Fan-Out Publish/Subscribe Messaging
- Problem: Databases Create Bottlenecks When Scaling
-
(Optional) Kafka and RabbitMQ Architectures
- What Is Apache Kafka?
- Apache Kafka Benefits
- Apache Kafka Use Cases
- Kafka Components - Topic, Partitions, Offset, and Replication Factor
- Apache Kafka Cluster Architecture
- Apache Kafka Core APIs - Producer, Consumer, Streams, and Connect API
- What Is RabbitMQ?
- RabbitMQ Components - Producer, Queue, Consumer, Message, Exchange, Binding
- RabbitMQ Exchange Types - Direct, Fanout, Topic, and Headers
- RabbitMQ Architecture
-
Scale the Microservices Architecture Design
-
Microservices Data Management - Choosing Right Database
- Introduction - Microservices Data Management
- Polyglot Persistence Principle in Microservices
- Microservices Database Management Patterns and Principles
- Design Patterns - The Database-Per-Service Pattern
- The Shared Database Anti-Pattern and Polyglot Persistence
- Relational and NoSQL Databases - Document, Key-Value, Graph-Based, Column-Based
- NoSQL Databases Types - Document, Key-Value, Graph-Based, Column-Based Databases
- When to Use Relational Databases
- When to Use NoSQL Databases?
- Best Practices When Choosing Data Store - Use Right Tool for Right Job
- How to Choose a Database for Microservices
- CAP Theorem
- Problem: Single Database Server Performs Low Performance
- What Is Data Partitioning? And Why We Are Using Data Partitioning?
- Data Partitioning: Horizontal, Vertical, and Functional Data Partitioning
- Database Sharding Pattern
- Tinder System Design Example of Database Sharding Pattern
- Cassandra NoSQL Database - Peer-to-Peer Distributed Wide Column Database
- Design: Microservices Architecture with Database Sharding Pattern
- Adapt: Microservices Architecture with Database Sharding Pattern - Cassandra
- Evaluate: Microservices Architecture with Database Sharding Pattern - Cassandra
- Problem: Cross-Service Queries and Write Commands on Distributed Scaled Database
-
Microservices Data Management - Commands and Queries
- Introduction - Microservices Data Management - Commands and Queries
- Microservices Data Management - Cross-Service Queries
- Problem: Cross-Service Queries with Sync Response, Decouple Way, and Low Latency
- Materialized View Pattern
- CQRS - Command Query Responsibility Segregation Pattern
- CQRS - Benefits and Drawbacks
- Best Practices for CQRS and Instagram Database Architecture with CQRS
- How to Sync Read and Write Databases in CQRS?
- Event Sourcing Pattern
- CQRS with Event Sourcing Pattern
- Eventual Consistency Principle
- Design Instagram System Architecture
- Design Instagram Database Architecture
- Design Microservices Architecture with CQRS, Event Sourcing, Eventual Consistent
- Adapt Microservices Architecture with CQRS, Event Sourcing, Eventual Consistent
- Evaluate Microservices Architecture with CQRS, Event Sourcing, Eventual Consist
- Problem Manage Consistency Across Microservices in Distributed Transactions
-
Microservices Distributed Transactions
- Introduction - Microservices Distributed Transactions
- Transaction Fundamentals and ACID Principles
- Transaction Management of Monolithic Architecture
- Microservices Distributed Transactions
- Microservices Bounded Context for Transactional Boundaries
- Microservices Transactional Boundaries
- SAGA Pattern for Distributed Transactions
- SAGA Pattern - Choreography-Based SAGA Implementation
- SAGA Pattern - Orchestration-Based SAGA Implementation
- Compensating Transaction Pattern
- Problem: Dual Write Problem
- Transactional Outbox Pattern
- Transactional Outbox Pattern in Microservices
- Problem: Listen and Polling Outbox Table
- What Is CDC - Change Data Capture?
- CDC - Change Data Capture with Outbox Pattern
- Implementation of CDC and Outbox Pattern with Cloud Databases - CockroachDB
- Implementation of CDC and Outbox Pattern with Cloud Databases Azure CosmosDB
- Design: Microservices Architecture with SAGA, Outbox Pattern, and CDC
- Adapt Microservice Architecture with SAGA, Transactional Outbox, and CDC Pattern
- Evaluate Microservices Architecture with SAGA, Transactional Outbox, and CDC
- Problem: Handle Millions of Events Across Microservices
-
Event-Driven Microservices Architectures
- Introduction - Event-Driven Microservices Architectures
- Event-Driven Microservices Architecture
- Real-Time Processing and High-Volume Events in Event-Driven Microservices
- Event Hubs and Event Streaming in Event-Driven Microservices Architecture
- Real-World Examples of Event-Driven Microservices Architecture
- Design Event-Driven Microservices Architecture
- Adapt Event-Driven Microservices Architecture
- Evaluate Event-Driven Microservices Architecture
- Problem: Database Operations Are Expensive, Low Performance
-
Microservices Distributed Caching
- Introduction - Microservices Distributed Caching
- What Is Caching?
- Types of Caching
- Distributed Caching in Microservices
- Cache Hit and Cache Miss
- Caching Strategies in Distributed Caching for Microservices
- Cache-Aside Pattern for Microservices
- Design Microservices Distributed Caching with Cache-Aside Pattern
- Adapt Microservices Distributed Caching with Cache-Aside Pattern
- Evaluate Microservices Distributed Caching with Cache-Aside Pattern
- Problem: Deploy Microservices at Any Time with Zero-Downtime and Flexible Scale
-
Microservices Deployments with Containers and Orchestrators
- Introduction - Microservices Deployments with Containers and Orchestrators
- What Are Containers?
- What Is Docker?
- Docker Containers, Images, and Registries
- Why Do We Use Them for Microservices Deployments?
- What Are Container Orchestrators?
- What Is Kubernetes and Why Do We Use Them for Microservices Deployments?
- Kubernetes Architecture
- Kubernetes Components
- Helm Charts with Kubernetes for Microservices Deployments
- Sidecar Pattern and How Does the Sidecar Pattern Work for Microservices Deploy
- Service Mesh Pattern and How the Service Mesh Pattern Work for Microservices
- DevOps and CI/CD Pipelines for Microservices Deployments
- CI/CD Pipeline Steps for Microservices Deployments
- CI/CD Tools for Microservices Deployments
- Deployment Strategies for Microservices Blue-Green, Rolling, and Canary Deploy
- Infrastructure as Code (IaC) and Usage in Microservices Deployments
- Design: Microservices Deployments with Containers and Orchestrators
- Adapt: Microservices Using Containers and Orchestrators
- Evaluate: Microservices with Using Containers and Orchestrators
- Problem: Fault Tolerance Microservices Able to Remain Operational for Any Fail
-
Microservices Resilience, Observability, and Monitoring
- Introduction - Microservices Resilience, Observability, and Monitoring
- What Is Microservices Resiliency?
- Microservices Resiliency Patterns
- Retry Pattern
- Circuit Breaker Pattern
- Circuit Breaker States
- Retry + Circuit Breaker Pattern
- Bulkhead Pattern
- Timeout Pattern
- Fallback Pattern
- Microservices Observability with Distributed Logging and Distributed Tracing
- Elastic Stack for Microservices Observability with Distributed Logging
- Microservices Distributed Tracing with OpenTelemetry Using Zipkin
- Microservices Health Checks: Liveness, Readiness, and Performance Checks
- Microservices Health Monitoring with Kubernetes, Prometheus, and Grafana
- Design Microservices Resilience, Observability, and Monitoring
- Adapt Microservices Resilience, Observability, and Monitoring
-
Demo: E-Commerce Implementation of Microservices Architecture
- Implementation of Microservices Architecture
- Demo Microservices Architecture Code Review - E-Commerce App
- Catalog Microservices Code Review - E-Commerce App
- Basket Microservices Code Review - E-Commerce App
- Discount Microservices Code Review - E-Commerce App
- Ordering Microservices Code Review - E-Commerce App
- API Gateways Microservices Code Review - E-Commerce App
- Client Applications Code Review - E-Commerce App
- Microservices Resilience, Observability, Monitoring Code Review - E-Commerce App
-
Serverless Microservices Architecture
-
Thanks
About this video
Microservices is an architectural approach where an application is composed of small, loosely coupled, and independently deployable services. Each service focuses on a specific business capability and can be developed, deployed, and scaled independently.
This course covers designing microservices architecture using patterns, principles, and best practices. Explore high availability, scalability, low latency, and network resilience. We will transition from monolithic to event-driven and serverless microservices and learn decomposition strategies, communication methods, data management, caching, and deployment techniques. We will understand resilience, observability, and monitoring, and apply design patterns. We will address database-per-service, API gateway, event sourcing, SAGA, and more. We will review code repositories, utilize event streaming, and implement health checks.
Discover DevOps, CI/CD pipelines, deployment strategies, and infrastructure as code. Gain insights into serverless microservices on AWS. We will engage in code review, refactor systems, and prepare for architecture interviews.
Upon completion, you will learn to handle requests by designing systems for high availability and scalability, low latency, and resilience to network failures on microservices distributed architectures.
- Publication date:
- July 2023
- Publisher
- Packt
- Duration
- 17 hours 12 minutes
- ISBN
- 9781805126782