SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Application modernization patterns
with Apache Kafka, Debezium,
and Kubernetes
Bilgin Ibryam
@bibryam
Product Manager
Red Hat
2
We build our computers
the way we build our cities -
over time, without a plan,
on top of ruins.
Ellen Ullman
About me
3
▸ Product Manager at Red Hat
▸ Former Principal Architect
▸ Committer at Apache Camel
▸ Author
・ Camel Design Patterns
・ Kubernetes Patterns
▸ @ bibryam
▸ https://www.ofbizian.com
About this talk
4
Application migration/modernization Rs
▸ Rehosting - lift-and-shift
▸ Replatorming - lift, tinker, and shift
▸ Refactor / Re-architect
・ Debezium
・ Apache Kafka
・ Kubernetes
Starting point
5
Challenges with monolithic applications
▸ Frequent deployment is difficult
▸ Obstacle to scaling development
▸ Scaling the application can be difficult
Expected modernization benefits
▸ Reduce time to market
▸ Greater team autonomy
▸ Improved automation
▸ Increased application performance
Target state
6
Cloud native microservices’ characteristics
▸ Independently deployable
▸ Modeled around a business domain
▸ Own their data
▸ Emit events (based on EDA)
▸ Built on open source technology such as
Kubernetes, Apache Kafka, Debezium
Measuring the results
▸ Lead time for change
▸ Deployment frequency
▸ Mean time to recovery
Migration
Challenges
Strangler Pattern
8
High-level steps
▸ Identify functional boundary
▸ Migrate/reimplement functionality
▸ Synchronize data
▸ Reroute traffic to new service
▸ Decomposition old service
Main benefits
▸ No big bang migration
▸ Minimal changes to the monolith
▸ Low risk with the ability to fall back
Functional boundary
9
Functional boundary considerations
▸ Aggregates, bounded context based on DDD
▸ Event Storming technique by A. Brandolini
▸ Data model coupling
▸ Module dependencies
Where to start from?
▸ Easy win
▸ Noticeable improvement
▸ A representative effort
Interception options
10
Prerequisites
▸ Ability to identify inbound calls
▸ Ability to direct calls to new service (and back)
Routing options
▸ Client redirection
▸ Transparent HTTP proxy
▸ Shared protocol translation proxy
▸ Embedded/sidecar proxy
Interception options
11
Prerequisites
▸ Ability to identify inbound calls
▸ Ability to direct calls to new service (and back)
Routing options
▸ Client redirection
▸ Transparent HTTP proxy
▸ Shared protocol translation proxy
▸ Embedded/sidecar custom proxy
Database strangulation
12
Database first Database and code together
Code first
Data synchronization
13
Cons
▸ Polling delay, might miss updates
▸ Polling overhead
▸ Deletes not captured
▸ Not transparent to writing application
Pros
▸ Simple Installation and configuration
Cons
▸ Varying capabilities
▸ Limited integration capabilities
▸ Not portable
▸ Not easily testable
▸ Not transparent to source database
Pros
▸ No additional application required
Cons
▸ Requires specialized tools
▸ Requires database configuration
Pros
▸ All changes (deletes) are captured
▸ No polling delay or overhead
▸ Transparent to writing application
Triggers Log readers
Queries/Polling
Debezium
14
What is Debezium?
▸ Open source Change Data Capture platform
▸ Snapshotting, filtering, transformations
▸ MySQL, PostgreSQL, MongoDB, SQL Server,
Db2, Oracle, Vitess, Cassandra
▸ Use cases: data replication, cache updates, search index
updates, audit logs, sync data between services
Strangler Pattern with Debezium
15
Strangler Pattern with Debezium
▸ Transparent to the writing application
▸ Initial bulk import through snapshotting
▸ Schema, table, column filtering
▸ Single Message Transformations as anti-corruption layer
▸ Schema Registry for schema validation and
compatibility enforcement of data models
Debezium with Apache Kafka
▸ Guaranteed ordering, message compaction
▸ Pull based - re-read from start, or new changes
▸ Kafka Connect - offset tracking, fail over
Release steps
16
Steps so far
▸ Identified a functional boundary
▸ Migrated it as a new service
▸ Created a new data model in a new database
▸ Automated and deployed everything
▸ Bulk imported data and kept it in-sync
▸ No traffic routed to the new service
Release steps
17
Next step
▸ Route READ traffic to the new service
Release steps
18
Next steps
▸ Route READ and WRITE traffic to the new service
▸ Two-way data synchronization in progress
Release steps
19
Next steps
▸ Stop WRITE traffic to legacy system
▸ Stop data synchronization from legacy system
Release steps
20
Final steps
▸ STOP READ traffic to the legacy application
▸ Stop data synchronization to legacy system
▸ Decommission migrated module
New
Challenges
Modernization challenges
22
Migration challenges
▸ Low-risk changes with demonstrable progress
▸ Deliver enhancements and new “business value”
▸ Simultaneously delivering new services
Distributed systems challenges
▸ Automation and operations at scale
▸ Dual-writes and long-running business transactions
▸ Analytical and reporting data needs
Operating event-driven services at scale
23
Microservices on Kubernetes
▸ Deployment/rollback
▸ Placement/scheduling
▸ Configuration management
▸ Resource/failure isolation
▸ Auto heal/upgrade (through operators)
Event-driven applications on Kubernetes
▸ Strimzi - operating Apache Kafka cluster
▸ KEDA - event-driven workload autoscaling
▸ Debezium - change data capture platform
▸ Knative Eventing - event-driven primitives
Outbox Pattern
24
Offers an approach for services to update their data store and
notify other services in a reliable and eventually consistent
manner.
▸ Addresses the dual-write problem
▸ Offers “read your own writes" semantics
▸ “at-least-once” semantics for consumers
Saga Pattern
25
Splits up long-running business transactions into a series of
multiple local transactions. When implemented using the Outbox
Pattern, it offers the benefits of orchestration and asynchronous
communication.
▸ Orchestration based coordination
▸ Asynchronous communication with Apache Kafka
Summary
26
Modern software systems are like cities - they evolve over time, on top of legacy systems. Using
proven patterns and standardized tools help create long-lasting systems that grow with your needs.
▸ Strangler Pattern - a low-risk application migration technique
▸ Outbox/Saga Patterns - reliable inter-service communication approach
▸ Debezium - a non-intrusive toolking for change data capture
▸ Kubernetes / Strimzi / Apache Kafka - de facto standards in their fields
Resources
27
▸ Monolith To Microservices
▸ Building Event-Driven Microservices
▸ Designing Data-Intensive Applications
▸ Kubernetes Patterns
▸ Debezium.io
▸ Keda.sh
▸ Strimzi.io
▸ github.com/windup
28
Red Hat OpenShift Streams
for Apache Kafka
a fully managed Apache Kafka service by Red Hat
http://red.ht/TryKafka
Try Apache Kafka in seconds
Application modernization patterns with apache kafka, debezium, and kubernetes   summit 2021

Mais conteúdo relacionado

Mais procurados

Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
HostedbyConfluent
 

Mais procurados (20)

Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
APACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka StreamsAPACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka Streams
 
Streaming architecture patterns
Streaming architecture patternsStreaming architecture patterns
Streaming architecture patterns
 
The Complete Guide to Service Mesh
The Complete Guide to Service MeshThe Complete Guide to Service Mesh
The Complete Guide to Service Mesh
 
Microservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka EcosystemMicroservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka Ecosystem
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Deploying Confluent Platform for Production
Deploying Confluent Platform for ProductionDeploying Confluent Platform for Production
Deploying Confluent Platform for Production
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
KSQL-ops! Running ksqlDB in the Wild (Simon Aubury, ThoughtWorks) Kafka Summi...
KSQL-ops! Running ksqlDB in the Wild (Simon Aubury, ThoughtWorks) Kafka Summi...KSQL-ops! Running ksqlDB in the Wild (Simon Aubury, ThoughtWorks) Kafka Summi...
KSQL-ops! Running ksqlDB in the Wild (Simon Aubury, ThoughtWorks) Kafka Summi...
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
 
Executing a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWSExecuting a Large-Scale Migration to AWS
Executing a Large-Scale Migration to AWS
 
Deep Dive into AWS SAM
Deep Dive into AWS SAMDeep Dive into AWS SAM
Deep Dive into AWS SAM
 
When NOT to use Apache Kafka?
When NOT to use Apache Kafka?When NOT to use Apache Kafka?
When NOT to use Apache Kafka?
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and Debezium
 
Cloud computing and migration strategies to cloud
Cloud computing and migration strategies to cloudCloud computing and migration strategies to cloud
Cloud computing and migration strategies to cloud
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
Kafka 101 and Developer Best Practices
Kafka 101 and Developer Best PracticesKafka 101 and Developer Best Practices
Kafka 101 and Developer Best Practices
 
(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code
 
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
Apicurio Registry: Event-driven APIs & Schema governance for Apache Kafka | F...
 

Semelhante a Application modernization patterns with apache kafka, debezium, and kubernetes summit 2021

Giga spaces value prop - afas - cloud practices
Giga spaces value prop - afas - cloud practicesGiga spaces value prop - afas - cloud practices
Giga spaces value prop - afas - cloud practices
Tricode (part of Dept)
 
Serverless Streaming Architectures and Algorithms for the Enterprise
Serverless Streaming Architectures and Algorithms for the EnterpriseServerless Streaming Architectures and Algorithms for the Enterprise
Serverless Streaming Architectures and Algorithms for the Enterprise
Arun Kejariwal
 

Semelhante a Application modernization patterns with apache kafka, debezium, and kubernetes summit 2021 (20)

Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...Modernization patterns to refactor a legacy application into event driven mic...
Modernization patterns to refactor a legacy application into event driven mic...
 
Dual write strategies for microservices
Dual write strategies for microservicesDual write strategies for microservices
Dual write strategies for microservices
 
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
(RivieraDev 2018) #serverless - 2 ans de retourS d'expérience
 
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
[Capitole du Libre] #serverless -  mettez-le en oeuvre dans votre entreprise...
 
POV - Practical Containerization
POV - Practical ContainerizationPOV - Practical Containerization
POV - Practical Containerization
 
DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...
DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...
DevoxxFR 2018 #serverless - Mettez-le en œuvre dans votre entreprise et arriv...
 
The Ideal Approach to Application Modernization; Which Way to the Cloud?
The Ideal Approach to Application Modernization; Which Way to the Cloud?The Ideal Approach to Application Modernization; Which Way to the Cloud?
The Ideal Approach to Application Modernization; Which Way to the Cloud?
 
Cloud Data Strategy event London
Cloud Data Strategy event LondonCloud Data Strategy event London
Cloud Data Strategy event London
 
Accelerating the Path to Digital with a Cloud Data Strategy
Accelerating the Path to Digital with a Cloud Data StrategyAccelerating the Path to Digital with a Cloud Data Strategy
Accelerating the Path to Digital with a Cloud Data Strategy
 
Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...Building Cloud-Native Applications with a Container-Native SQL Database in th...
Building Cloud-Native Applications with a Container-Native SQL Database in th...
 
App Modernisation with Microsoft Azure
App Modernisation with Microsoft AzureApp Modernisation with Microsoft Azure
App Modernisation with Microsoft Azure
 
Azure App Modernization
Azure App ModernizationAzure App Modernization
Azure App Modernization
 
SaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy TransformationSaaSification in Action. Attracting Software Vendors with Easy Transformation
SaaSification in Action. Attracting Software Vendors with Easy Transformation
 
Giga spaces value prop - afas - cloud practices
Giga spaces value prop - afas - cloud practicesGiga spaces value prop - afas - cloud practices
Giga spaces value prop - afas - cloud practices
 
The intersection of Traditional IT and New-Generation IT
The intersection of Traditional IT and New-Generation ITThe intersection of Traditional IT and New-Generation IT
The intersection of Traditional IT and New-Generation IT
 
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with A...
 
Accelerate Digital Transformation with IBM Cloud Private
Accelerate Digital Transformation with IBM Cloud PrivateAccelerate Digital Transformation with IBM Cloud Private
Accelerate Digital Transformation with IBM Cloud Private
 
Next gen software operations models in the cloud
Next gen software operations models in the cloudNext gen software operations models in the cloud
Next gen software operations models in the cloud
 
Serverless Streaming Architectures and Algorithms for the Enterprise
Serverless Streaming Architectures and Algorithms for the EnterpriseServerless Streaming Architectures and Algorithms for the Enterprise
Serverless Streaming Architectures and Algorithms for the Enterprise
 
IBM RedHat OCP Vs xKS.pptx
IBM RedHat OCP Vs xKS.pptxIBM RedHat OCP Vs xKS.pptx
IBM RedHat OCP Vs xKS.pptx
 

Mais de Bilgin Ibryam

Mais de Bilgin Ibryam (11)

Dapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageDapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any Language
 
How to financially survive while growing a small open source project
How to financially survive while growing a small open source projectHow to financially survive while growing a small open source project
How to financially survive while growing a small open source project
 
What next after microservices
What next after microservicesWhat next after microservices
What next after microservices
 
The Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on KubernetesThe Evolution of Distributed Systems on Kubernetes
The Evolution of Distributed Systems on Kubernetes
 
Enterprise Integration for Ethereum
Enterprise Integration for EthereumEnterprise Integration for Ethereum
Enterprise Integration for Ethereum
 
The Kubernetes Effect
The Kubernetes EffectThe Kubernetes Effect
The Kubernetes Effect
 
Designing Cloud Native Applications with Kubernetes
Designing Cloud Native Applications with KubernetesDesigning Cloud Native Applications with Kubernetes
Designing Cloud Native Applications with Kubernetes
 
Cloud Native Patterns
Cloud Native PatternsCloud Native Patterns
Cloud Native Patterns
 
Cloud Native Java Development Patterns
Cloud Native Java Development PatternsCloud Native Java Development Patterns
Cloud Native Java Development Patterns
 
Cloud Native Camel Design Patterns
Cloud Native Camel Design PatternsCloud Native Camel Design Patterns
Cloud Native Camel Design Patterns
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 

Application modernization patterns with apache kafka, debezium, and kubernetes summit 2021

  • 1. Application modernization patterns with Apache Kafka, Debezium, and Kubernetes Bilgin Ibryam @bibryam Product Manager Red Hat
  • 2. 2 We build our computers the way we build our cities - over time, without a plan, on top of ruins. Ellen Ullman
  • 3. About me 3 ▸ Product Manager at Red Hat ▸ Former Principal Architect ▸ Committer at Apache Camel ▸ Author ・ Camel Design Patterns ・ Kubernetes Patterns ▸ @ bibryam ▸ https://www.ofbizian.com
  • 4. About this talk 4 Application migration/modernization Rs ▸ Rehosting - lift-and-shift ▸ Replatorming - lift, tinker, and shift ▸ Refactor / Re-architect ・ Debezium ・ Apache Kafka ・ Kubernetes
  • 5. Starting point 5 Challenges with monolithic applications ▸ Frequent deployment is difficult ▸ Obstacle to scaling development ▸ Scaling the application can be difficult Expected modernization benefits ▸ Reduce time to market ▸ Greater team autonomy ▸ Improved automation ▸ Increased application performance
  • 6. Target state 6 Cloud native microservices’ characteristics ▸ Independently deployable ▸ Modeled around a business domain ▸ Own their data ▸ Emit events (based on EDA) ▸ Built on open source technology such as Kubernetes, Apache Kafka, Debezium Measuring the results ▸ Lead time for change ▸ Deployment frequency ▸ Mean time to recovery
  • 8. Strangler Pattern 8 High-level steps ▸ Identify functional boundary ▸ Migrate/reimplement functionality ▸ Synchronize data ▸ Reroute traffic to new service ▸ Decomposition old service Main benefits ▸ No big bang migration ▸ Minimal changes to the monolith ▸ Low risk with the ability to fall back
  • 9. Functional boundary 9 Functional boundary considerations ▸ Aggregates, bounded context based on DDD ▸ Event Storming technique by A. Brandolini ▸ Data model coupling ▸ Module dependencies Where to start from? ▸ Easy win ▸ Noticeable improvement ▸ A representative effort
  • 10. Interception options 10 Prerequisites ▸ Ability to identify inbound calls ▸ Ability to direct calls to new service (and back) Routing options ▸ Client redirection ▸ Transparent HTTP proxy ▸ Shared protocol translation proxy ▸ Embedded/sidecar proxy
  • 11. Interception options 11 Prerequisites ▸ Ability to identify inbound calls ▸ Ability to direct calls to new service (and back) Routing options ▸ Client redirection ▸ Transparent HTTP proxy ▸ Shared protocol translation proxy ▸ Embedded/sidecar custom proxy
  • 12. Database strangulation 12 Database first Database and code together Code first
  • 13. Data synchronization 13 Cons ▸ Polling delay, might miss updates ▸ Polling overhead ▸ Deletes not captured ▸ Not transparent to writing application Pros ▸ Simple Installation and configuration Cons ▸ Varying capabilities ▸ Limited integration capabilities ▸ Not portable ▸ Not easily testable ▸ Not transparent to source database Pros ▸ No additional application required Cons ▸ Requires specialized tools ▸ Requires database configuration Pros ▸ All changes (deletes) are captured ▸ No polling delay or overhead ▸ Transparent to writing application Triggers Log readers Queries/Polling
  • 14. Debezium 14 What is Debezium? ▸ Open source Change Data Capture platform ▸ Snapshotting, filtering, transformations ▸ MySQL, PostgreSQL, MongoDB, SQL Server, Db2, Oracle, Vitess, Cassandra ▸ Use cases: data replication, cache updates, search index updates, audit logs, sync data between services
  • 15. Strangler Pattern with Debezium 15 Strangler Pattern with Debezium ▸ Transparent to the writing application ▸ Initial bulk import through snapshotting ▸ Schema, table, column filtering ▸ Single Message Transformations as anti-corruption layer ▸ Schema Registry for schema validation and compatibility enforcement of data models Debezium with Apache Kafka ▸ Guaranteed ordering, message compaction ▸ Pull based - re-read from start, or new changes ▸ Kafka Connect - offset tracking, fail over
  • 16. Release steps 16 Steps so far ▸ Identified a functional boundary ▸ Migrated it as a new service ▸ Created a new data model in a new database ▸ Automated and deployed everything ▸ Bulk imported data and kept it in-sync ▸ No traffic routed to the new service
  • 17. Release steps 17 Next step ▸ Route READ traffic to the new service
  • 18. Release steps 18 Next steps ▸ Route READ and WRITE traffic to the new service ▸ Two-way data synchronization in progress
  • 19. Release steps 19 Next steps ▸ Stop WRITE traffic to legacy system ▸ Stop data synchronization from legacy system
  • 20. Release steps 20 Final steps ▸ STOP READ traffic to the legacy application ▸ Stop data synchronization to legacy system ▸ Decommission migrated module
  • 22. Modernization challenges 22 Migration challenges ▸ Low-risk changes with demonstrable progress ▸ Deliver enhancements and new “business value” ▸ Simultaneously delivering new services Distributed systems challenges ▸ Automation and operations at scale ▸ Dual-writes and long-running business transactions ▸ Analytical and reporting data needs
  • 23. Operating event-driven services at scale 23 Microservices on Kubernetes ▸ Deployment/rollback ▸ Placement/scheduling ▸ Configuration management ▸ Resource/failure isolation ▸ Auto heal/upgrade (through operators) Event-driven applications on Kubernetes ▸ Strimzi - operating Apache Kafka cluster ▸ KEDA - event-driven workload autoscaling ▸ Debezium - change data capture platform ▸ Knative Eventing - event-driven primitives
  • 24. Outbox Pattern 24 Offers an approach for services to update their data store and notify other services in a reliable and eventually consistent manner. ▸ Addresses the dual-write problem ▸ Offers “read your own writes" semantics ▸ “at-least-once” semantics for consumers
  • 25. Saga Pattern 25 Splits up long-running business transactions into a series of multiple local transactions. When implemented using the Outbox Pattern, it offers the benefits of orchestration and asynchronous communication. ▸ Orchestration based coordination ▸ Asynchronous communication with Apache Kafka
  • 26. Summary 26 Modern software systems are like cities - they evolve over time, on top of legacy systems. Using proven patterns and standardized tools help create long-lasting systems that grow with your needs. ▸ Strangler Pattern - a low-risk application migration technique ▸ Outbox/Saga Patterns - reliable inter-service communication approach ▸ Debezium - a non-intrusive toolking for change data capture ▸ Kubernetes / Strimzi / Apache Kafka - de facto standards in their fields
  • 27. Resources 27 ▸ Monolith To Microservices ▸ Building Event-Driven Microservices ▸ Designing Data-Intensive Applications ▸ Kubernetes Patterns ▸ Debezium.io ▸ Keda.sh ▸ Strimzi.io ▸ github.com/windup
  • 28. 28 Red Hat OpenShift Streams for Apache Kafka a fully managed Apache Kafka service by Red Hat http://red.ht/TryKafka Try Apache Kafka in seconds