SlideShare a Scribd company logo
Microservices
Event driven & the hidden landmines
Business Objective
• BankNext’s ambitious digital transformation mission
• Desires to make the customer onboarding process seamless
• Elaborate functional flow analysis conducted
• Orchestration architecture implemented to collaborate between microservices
Traditional Orchestration Architecture
Business Flow
1. Initiation
Prospective customer initiates the joining process on BankNext
2. Prechecks
Screening MSvc - examine the prospect
Deduplication MSvc - ensure entity non duplicity
3. Core Services (after prechecks pass)
CustomerMgt Msvc - create Customer entity
AccountMgt Msvc - add Account to this customer
4. Compliance/Future capabilities
Monitoring Msvc - initial period suspicious activities check
Recommendation Msvc - customer delight based on customer’s preferences
Architecture Positives
• BankNext is quiet happy with this architecture because –
1. Entity Orchestrator Msvc enables collaboration between multiple microservices
2. Orchestrator is capable of sequencing and synchronizing the invocations
3. Orchestrator can adjust responsively react to actions/exceptions from the called microservices
4. Orchestrator cleverly uses the CompletableFutures for Async parallel calls wherever applicable
Architecture Negatives
• BankNext quickly realizes: (Houston) we have a problem(s)
1. Undesirable latency when invoking & collating responses from multiple msvcs
2. Rough calculation :
• Assume each Msvc call = 300ms,
• Total time for all 7 responses = 2.1seconds (i.e. 300ms * 7) minimum
• excluding n/w , other I/O latencies
3. Prospective customer very unhappy
4. Future capability addition (new msvc) compels explicit invocation call in the Orchestrator
5. Tight coupling
Back to the Drawing Board
• Business & Engineering teams thoroughly analyze the flow
• Conclude that the root cause of the latency are the longer running services.
• The Screening and Deduplication prechecks are mandatory.
• Once passed the prospect is cleared to get an account and can be notified immediately
• The Monitoring & Recommendation msvcs are secondary services & should not delay the user
confirmation.
Technical Challenge
• To meet this business vision, the system design has to evolve
• Break down the flow such that the user confirmation is sent immediately after prechecks.
• Also ensure that core customer & account creation continue & conclude
• Future capability additions Monitoring & Recommendation are non intrusive
Event-Driven Choreography Architecture
Technical Implementation
Event-Driven Choreography
• Onboarding Customer -
i. After prechecks pass, EntityMgt Msvc publishes new entity txn to Kafka “new_entity_initiated_topic”
ii. Next, EntityMgt Msvc immediately sends back an initial user confirmation
iii. CustomerMgt Msvc subscribes to the Kafka “new_entity_initiated_topic”
iv. Consumes this event & creates the new customer entity
v. Publishes this event to Kafka “new_customer_created_topic”
Technical Implementation (contd..)
Event-Driven Choreography
• Onboarding Account -
i. AccountMgt Msvc subscribes to Kafka “new_customer_created_topic”
ii. Consumes this event & creates the account for this customer in the system
iii. Publishes this event to the Kafka “new_account_created_topic”
Technical Implementation (contd..)
Event-Driven Choreography
• Future Capability Efficiency -
i. Supporting msvcs Monitoring & Recommendation subscribe to Kafka “new_account_created_topic”
ii. Eliminates tight coupling & explicit invocation between services
iii. Asynchronous system requires a new Notification Msvc to send final confirmation to the customer
iv. This new svc is hooked up with ease by simply subscribing to the Kafka “new_account_created_topic”
New Architecture Positives
1. Significant improvement in system responsiveness to the customer
2. Elimination of tight coupling & explicit new service call invocations
3. The system only needs to know the topic to publish or subscribe to
4. Tremendous future flexibility as new services integrated by simply subscribing to the right topic
New Architecture Negatives (hidden landmines)
1. With the improved flexibility comes higher system complexity
2. Major infrastructure enhancement for event driven processing
3. Requires robust messaging components
4. Observability & tracing need significant ramp up for system debugging in failure scenarios
5. State management, retries and system wide rollbacks become complex
6. Requires elaborate SAGA implementation (will be covered in the next article) for system atomicity
Summary : Architecture, TechStack & Rationale
Github : https://github.com/vijayredkar/event-driven-platform
Architecture Goal Strategy Techstack Rationale
Flexible & extensible integrations Choreography Topics Eliminates centralized coordinator dependency
Event driven capability Messaging systems Kafka Eliminates tight coupling btwn svcs
Future capability efficiencies Publish/Subscribe Kafka Eliminates explicit new svc call invocation
System wide observability Centralized logging/tracing ELK/Sleuth Async logging & observability
Heavy volume/TPS Streaming Kafka/Async operations Extremely low latency
Parallel Aggregation CompletableFuture Java General purpose
Framework microservices Springboot General purpose
Thank you!
-Vijay Redkar
Github: https://github.com/vijayredkar
Medium: https://vijayredkar.medium.com/
vijay0512@yahoo.com

More Related Content

What's hot

What's hot (20)

Connecting All Abstractions with Istio
Connecting All Abstractions with IstioConnecting All Abstractions with Istio
Connecting All Abstractions with Istio
 
Netflix MSA and Pivotal
Netflix MSA and PivotalNetflix MSA and Pivotal
Netflix MSA and Pivotal
 
클라우드 네이티브 플랫폼의 미래 - Kubernetes 기반의 PCF 로드맵
클라우드 네이티브 플랫폼의 미래 - Kubernetes 기반의 PCF 로드맵 클라우드 네이티브 플랫폼의 미래 - Kubernetes 기반의 PCF 로드맵
클라우드 네이티브 플랫폼의 미래 - Kubernetes 기반의 PCF 로드맵
 
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud - An...
 
Microservices architecture overview v3
Microservices architecture overview v3Microservices architecture overview v3
Microservices architecture overview v3
 
Resilient Microservices with Spring Cloud
Resilient Microservices with Spring CloudResilient Microservices with Spring Cloud
Resilient Microservices with Spring Cloud
 
Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
 
MicroServices on Azure
MicroServices on AzureMicroServices on Azure
MicroServices on Azure
 
Deploying Microservices as Containers
Deploying Microservices as ContainersDeploying Microservices as Containers
Deploying Microservices as Containers
 
Craig McLuckie at VMware Tanzu Public Sector Connect 2021
Craig McLuckie at VMware Tanzu Public Sector Connect 2021Craig McLuckie at VMware Tanzu Public Sector Connect 2021
Craig McLuckie at VMware Tanzu Public Sector Connect 2021
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
 
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
 
Spring Boot Observability
Spring Boot ObservabilitySpring Boot Observability
Spring Boot Observability
 
The Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET frameworkThe Microservices world in. NET Core and. NET framework
The Microservices world in. NET Core and. NET framework
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
 
Tokyo azure meetup #12 service fabric internals
Tokyo azure meetup #12   service fabric internalsTokyo azure meetup #12   service fabric internals
Tokyo azure meetup #12 service fabric internals
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Building Services with WSO2 Application Server and WSO2 Microservices Framewo...
Building Services with WSO2 Application Server and WSO2 Microservices Framewo...Building Services with WSO2 Application Server and WSO2 Microservices Framewo...
Building Services with WSO2 Application Server and WSO2 Microservices Framewo...
 

Similar to Microservices - Event-driven & the hidden landmines

Order management, provisioning and activation
Order management, provisioning and activationOrder management, provisioning and activation
Order management, provisioning and activation
VijayIndra Shekhawat
 

Similar to Microservices - Event-driven & the hidden landmines (20)

Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupUsing Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
 
Scenarios in Which Kubernetes is Used for Container Orchestration of a Web Ap...
Scenarios in Which Kubernetes is Used for Container Orchestration of a Web Ap...Scenarios in Which Kubernetes is Used for Container Orchestration of a Web Ap...
Scenarios in Which Kubernetes is Used for Container Orchestration of a Web Ap...
 
WSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice ArchitectureWSO2Con ASIA 2016: Understanding Microservice Architecture
WSO2Con ASIA 2016: Understanding Microservice Architecture
 
Microservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into productionMicroservices in Action: putting microservice-based applications into production
Microservices in Action: putting microservice-based applications into production
 
Automating the Cloud: A Deep Dive into Virtual Machine Provisioning
Automating the Cloud: A Deep Dive into Virtual Machine ProvisioningAutomating the Cloud: A Deep Dive into Virtual Machine Provisioning
Automating the Cloud: A Deep Dive into Virtual Machine Provisioning
 
Order management, provisioning and activation
Order management, provisioning and activationOrder management, provisioning and activation
Order management, provisioning and activation
 
vm provisioning
vm provisioningvm provisioning
vm provisioning
 
2 vm provisioning
2 vm provisioning2 vm provisioning
2 vm provisioning
 
apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...
apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...
apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...
 
Automating End-to-End Business Scenario Testing
Automating End-to-End Business Scenario TestingAutomating End-to-End Business Scenario Testing
Automating End-to-End Business Scenario Testing
 
Continuous Integration and Continuous Delivery to Facilitate Web Service Testing
Continuous Integration and Continuous Delivery to Facilitate Web Service TestingContinuous Integration and Continuous Delivery to Facilitate Web Service Testing
Continuous Integration and Continuous Delivery to Facilitate Web Service Testing
 
Microservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eurekaMicroservice creation using spring cloud, zipkin, ribbon, zull, eureka
Microservice creation using spring cloud, zipkin, ribbon, zull, eureka
 
Event driven architecure
Event driven architecureEvent driven architecure
Event driven architecure
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
.NET Consulting Portfolio | ASP.NET Development Case Studies
.NET Consulting Portfolio | ASP.NET Development Case Studies.NET Consulting Portfolio | ASP.NET Development Case Studies
.NET Consulting Portfolio | ASP.NET Development Case Studies
 
Cloud Native DevOps
Cloud Native DevOpsCloud Native DevOps
Cloud Native DevOps
 
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
Chapter 05: Eclipse Vert.x - Service Discovery, Resilience and Stability Patt...
 
Embracing Containers and Microservices for Future Proof Application Moderniza...
Embracing Containers and Microservices for Future Proof Application Moderniza...Embracing Containers and Microservices for Future Proof Application Moderniza...
Embracing Containers and Microservices for Future Proof Application Moderniza...
 
Cisco ONE Enterprise Cloud Suite
Cisco ONE Enterprise Cloud SuiteCisco ONE Enterprise Cloud Suite
Cisco ONE Enterprise Cloud Suite
 
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
How did we move the mountain? - Migrating 1 trillion+ messages per day across...How did we move the mountain? - Migrating 1 trillion+ messages per day across...
How did we move the mountain? - Migrating 1 trillion+ messages per day across...
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Motion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in TechnologyMotion for AI: Creating Empathy in Technology
Motion for AI: Creating Empathy in Technology
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 

Microservices - Event-driven & the hidden landmines

  • 1. Microservices Event driven & the hidden landmines
  • 2. Business Objective • BankNext’s ambitious digital transformation mission • Desires to make the customer onboarding process seamless • Elaborate functional flow analysis conducted • Orchestration architecture implemented to collaborate between microservices
  • 4. Business Flow 1. Initiation Prospective customer initiates the joining process on BankNext 2. Prechecks Screening MSvc - examine the prospect Deduplication MSvc - ensure entity non duplicity 3. Core Services (after prechecks pass) CustomerMgt Msvc - create Customer entity AccountMgt Msvc - add Account to this customer 4. Compliance/Future capabilities Monitoring Msvc - initial period suspicious activities check Recommendation Msvc - customer delight based on customer’s preferences
  • 5. Architecture Positives • BankNext is quiet happy with this architecture because – 1. Entity Orchestrator Msvc enables collaboration between multiple microservices 2. Orchestrator is capable of sequencing and synchronizing the invocations 3. Orchestrator can adjust responsively react to actions/exceptions from the called microservices 4. Orchestrator cleverly uses the CompletableFutures for Async parallel calls wherever applicable
  • 6. Architecture Negatives • BankNext quickly realizes: (Houston) we have a problem(s) 1. Undesirable latency when invoking & collating responses from multiple msvcs 2. Rough calculation : • Assume each Msvc call = 300ms, • Total time for all 7 responses = 2.1seconds (i.e. 300ms * 7) minimum • excluding n/w , other I/O latencies 3. Prospective customer very unhappy 4. Future capability addition (new msvc) compels explicit invocation call in the Orchestrator 5. Tight coupling
  • 7. Back to the Drawing Board • Business & Engineering teams thoroughly analyze the flow • Conclude that the root cause of the latency are the longer running services. • The Screening and Deduplication prechecks are mandatory. • Once passed the prospect is cleared to get an account and can be notified immediately • The Monitoring & Recommendation msvcs are secondary services & should not delay the user confirmation.
  • 8. Technical Challenge • To meet this business vision, the system design has to evolve • Break down the flow such that the user confirmation is sent immediately after prechecks. • Also ensure that core customer & account creation continue & conclude • Future capability additions Monitoring & Recommendation are non intrusive
  • 10. Technical Implementation Event-Driven Choreography • Onboarding Customer - i. After prechecks pass, EntityMgt Msvc publishes new entity txn to Kafka “new_entity_initiated_topic” ii. Next, EntityMgt Msvc immediately sends back an initial user confirmation iii. CustomerMgt Msvc subscribes to the Kafka “new_entity_initiated_topic” iv. Consumes this event & creates the new customer entity v. Publishes this event to Kafka “new_customer_created_topic”
  • 11. Technical Implementation (contd..) Event-Driven Choreography • Onboarding Account - i. AccountMgt Msvc subscribes to Kafka “new_customer_created_topic” ii. Consumes this event & creates the account for this customer in the system iii. Publishes this event to the Kafka “new_account_created_topic”
  • 12. Technical Implementation (contd..) Event-Driven Choreography • Future Capability Efficiency - i. Supporting msvcs Monitoring & Recommendation subscribe to Kafka “new_account_created_topic” ii. Eliminates tight coupling & explicit invocation between services iii. Asynchronous system requires a new Notification Msvc to send final confirmation to the customer iv. This new svc is hooked up with ease by simply subscribing to the Kafka “new_account_created_topic”
  • 13. New Architecture Positives 1. Significant improvement in system responsiveness to the customer 2. Elimination of tight coupling & explicit new service call invocations 3. The system only needs to know the topic to publish or subscribe to 4. Tremendous future flexibility as new services integrated by simply subscribing to the right topic
  • 14. New Architecture Negatives (hidden landmines) 1. With the improved flexibility comes higher system complexity 2. Major infrastructure enhancement for event driven processing 3. Requires robust messaging components 4. Observability & tracing need significant ramp up for system debugging in failure scenarios 5. State management, retries and system wide rollbacks become complex 6. Requires elaborate SAGA implementation (will be covered in the next article) for system atomicity
  • 15. Summary : Architecture, TechStack & Rationale Github : https://github.com/vijayredkar/event-driven-platform Architecture Goal Strategy Techstack Rationale Flexible & extensible integrations Choreography Topics Eliminates centralized coordinator dependency Event driven capability Messaging systems Kafka Eliminates tight coupling btwn svcs Future capability efficiencies Publish/Subscribe Kafka Eliminates explicit new svc call invocation System wide observability Centralized logging/tracing ELK/Sleuth Async logging & observability Heavy volume/TPS Streaming Kafka/Async operations Extremely low latency Parallel Aggregation CompletableFuture Java General purpose Framework microservices Springboot General purpose
  • 16. Thank you! -Vijay Redkar Github: https://github.com/vijayredkar Medium: https://vijayredkar.medium.com/ vijay0512@yahoo.com