SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
KAFKA @
WIRECARD BRASIL
CAUÊ FERREIRA
HOW AM I?
CAUÊ FERREIRA
▸ Senior Software Engineer at Wirecard Brasil for 7 years
▸ About 10 years of experience in development
▸ Loves to solve and architect new solutions
Medium, Github, Linkedin, Twitter: caueferreira
KAFKA @
WIRECARD BRASIL
A REAL CASE OF KAFKA
STREAMS IN A FINTECH
WHAT WE WILL NOT COVER DURING THIS PRESENTATION
WHAT THIS PRESENTATION IS NOT ABOUT
▸ Coding
▸ How to implement
▸ Tutorials
SO, WHAT WILL WE FIND IN THIS PRESENTATION?
WHAT IS HERE?
▸ The architecture of a real service
▸ The evolution of this architecture
▸ The final solution of the architecture
▸ Why we decided to move to Kafka Streams
▸ What challenges we faced during the development
▸ What problems we had while implementing it
▸ How we are today and what is up to the future
THE PROBLEM
JUST A REGULAR HTTP CALL
https: //sandbox.moip.com.br/v2/orders?q=caue.ferreira
&filters=status::in(PAID,WAITING)|paymentMethod::in(CREDIT_CARD,BOLETO)|
value::bt(5000,10000)&limit=3&offset=0
REPORTS-API
the status must be either PAID or WAITING
the paymentMethod should be either CREDIT_CARD or BOLETO
the value must be between 5000 to 10000
THE BEGINNING
OUR FIRST ARCHITECTURE
INVOICE’S SERVICE FIRST ARCHITECTURE
INVOICE-API
DATA
BASE
RETRIEVES
DATA
RABBITMQ
UPDATES
DATABASE
INVOICE-
SYNC
ORDER-API
LISTEN TO
QUEUE
UPDATES
INVOICE
GETS
DATA
REPORTS-
SYNC
ELASTIC
SEARCH
INSERT
DOCUMENTS
A CLASSIC ELASTIC SYNC PROBLEM
WHAT WENT WRONG?
▸ Reports-Sync, was single application responsible to sync all data from several
other applications
▸ Reports-Sync retrieves data in chunks from Invoice’s database, eventually
leading to unsynchronised data
▸ Reports-Api/Sync lack of a real owner
▸ The business logic of building an invoice was scattered between more than one
application
▸ Any down time in Reports-Sync would affect the synching of several applications
▸ Any down time in Reports-Api would render other applications unable to
retrieve invoices from the Elastic Search
THE FIRST SOLUTION,
BEFORE KAFKA
OUR SOLUTION, BEFORE KAFKA
INVOICE’S SERVICE SECOND ARCHITECTURE
INVOICE-API
DATA
BASE
RABBITMQ
UPDATES
DATABASE
INVOICE-
SYNC
ORDER-API
LISTEN TO
QUEUE
UPDATES
INVOICE
GETS
DATA
ELASTIC
SEARCH
INSERT
DOCUMENTS
WHAT WE DID GOOD?
WHAT WAS OUR HITS?
▸ Invoice now has ownership of every aspect of itself
▸ Invoice no longer depends on any Reports service
▸ The business logic of building an invoice was scattered
between more than one application
▸ Invoice had a new elastic search cluster
THE CURRENT
ARCHITECTURE
OUR FIRST IDEA WAS TO IMPLEMENT A CDC PATTERN
RETRIEVING THE DATA FROM THE DATABASE. TO DO SO WE
NEEDED TO CREATE A CONNECT AND WE DECIDED TO USE
DEBEZIUM AS OUR SOURCE CONNECTOR TO RETRIEVE ALL
DATA FROM THE DATABASE BINLOG AND INSERT THEM
INTO THE KAFKA CONNECT'S TOPIC.
Just a phrase from the article
WHAT WE’RE AIMING?
OUR FINAL ARCHITECTURE USING KAFKA
INVOICE’S CURRENT ARCHITECTURE
INVOICE-API
DATA
BASE
INVOICE-
SYNC
ORDER-API
RETRIEVES
DATA FROM
THE BINLOG
FILE
INSERT
DOCUMENTS
ELASTIC
SEARCH
KAFKA-CONNECT
Database connector
ZOOKEEPER
KAFKA CLUSTER
KAFKA
BROKER
KAFKA
BROKER
KAFKA
BROKER
PRODUCE
EVENTS
RETRIEVES
DATA FROM
TOPIC
GETS
INVOICE
FROM ID
RETRIEVE
PAYMENT
INFO
PRODUCES
TRANSFORMED
EVENT
KAFKA-CONNECT
Elastic search connector
RETRIEVES
DATA FROM
TOPIC
WHAT WE DID GOOD?
WHAT WAS OUR HITS?
▸ We've a really stable and robust environment, about twenty projects are
already using Kafka streams at Wirecard Brazil
▸ We reduced considerable the amount of tickets opened because of
missing or out of date resources
▸ The invoice api had a memory leak that every now and then would
shutdown the application, not anymore
▸ While is true that the invoice api uses kafka exclusively to produces
documents to its elastic search, we're already producing events of invoices
so any application that wants to work with those resources are able to get
them without requesting data from the invoice api, thus not overloading it.
POST MORTEN
WHAT WE LEARNED?
WHAT HAPPENED?
▸ We started with a single kafka connect to rule all connectors across all applications,
it didn't took long for us to realize that we were back to the reports-api problem.
▸ Pay attention to Kafka variables
▸ Load retroactive data
▸ Avro and bad parsed resource
▸ A Kafka connect for each application
▸ Check your retention
▸ Kafka Manager
▸ Complexity and learning curve
WHAT IS NEXT?
WHERE ARE WE HEADING NOW?
WHAT IS NEXT?
▸ There are several applications that we’ve that aren’t using
Kafka
▸ We still have some applications using Reports service
▸ Some applications are not using Avro
▸ Infrastructure as a code, immutable.
▸ We should update our Kafka version
▸ Try the new Cloud-Native Experience for Kafka
THERE IS ALSO A POST IN THE MEDIUM
LINK TO THE ARTICLE
You can find it at my Medium account,
https://medium.com/@caueferreira
WHERE CAN I FIND THIS PRESENTATION
LINK TO THE PRESENTATION
You can also find it at my LinkedIn account,
https://linkedin.com/in/caueferreira
QUESTIONS?
THANKS

Mais conteúdo relacionado

Último

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxchumtiyababu
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 

Último (20)

Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 

Destaque

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Destaque (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

A real showcase of Kafka at Wirecard Brasil

  • 2. HOW AM I? CAUÊ FERREIRA ▸ Senior Software Engineer at Wirecard Brasil for 7 years ▸ About 10 years of experience in development ▸ Loves to solve and architect new solutions Medium, Github, Linkedin, Twitter: caueferreira
  • 3. KAFKA @ WIRECARD BRASIL A REAL CASE OF KAFKA STREAMS IN A FINTECH
  • 4. WHAT WE WILL NOT COVER DURING THIS PRESENTATION WHAT THIS PRESENTATION IS NOT ABOUT ▸ Coding ▸ How to implement ▸ Tutorials
  • 5. SO, WHAT WILL WE FIND IN THIS PRESENTATION? WHAT IS HERE? ▸ The architecture of a real service ▸ The evolution of this architecture ▸ The final solution of the architecture ▸ Why we decided to move to Kafka Streams ▸ What challenges we faced during the development ▸ What problems we had while implementing it ▸ How we are today and what is up to the future
  • 7. JUST A REGULAR HTTP CALL https: //sandbox.moip.com.br/v2/orders?q=caue.ferreira &filters=status::in(PAID,WAITING)|paymentMethod::in(CREDIT_CARD,BOLETO)| value::bt(5000,10000)&limit=3&offset=0 REPORTS-API the status must be either PAID or WAITING the paymentMethod should be either CREDIT_CARD or BOLETO the value must be between 5000 to 10000
  • 9. OUR FIRST ARCHITECTURE INVOICE’S SERVICE FIRST ARCHITECTURE INVOICE-API DATA BASE RETRIEVES DATA RABBITMQ UPDATES DATABASE INVOICE- SYNC ORDER-API LISTEN TO QUEUE UPDATES INVOICE GETS DATA REPORTS- SYNC ELASTIC SEARCH INSERT DOCUMENTS
  • 10. A CLASSIC ELASTIC SYNC PROBLEM WHAT WENT WRONG? ▸ Reports-Sync, was single application responsible to sync all data from several other applications ▸ Reports-Sync retrieves data in chunks from Invoice’s database, eventually leading to unsynchronised data ▸ Reports-Api/Sync lack of a real owner ▸ The business logic of building an invoice was scattered between more than one application ▸ Any down time in Reports-Sync would affect the synching of several applications ▸ Any down time in Reports-Api would render other applications unable to retrieve invoices from the Elastic Search
  • 12. OUR SOLUTION, BEFORE KAFKA INVOICE’S SERVICE SECOND ARCHITECTURE INVOICE-API DATA BASE RABBITMQ UPDATES DATABASE INVOICE- SYNC ORDER-API LISTEN TO QUEUE UPDATES INVOICE GETS DATA ELASTIC SEARCH INSERT DOCUMENTS
  • 13. WHAT WE DID GOOD? WHAT WAS OUR HITS? ▸ Invoice now has ownership of every aspect of itself ▸ Invoice no longer depends on any Reports service ▸ The business logic of building an invoice was scattered between more than one application ▸ Invoice had a new elastic search cluster
  • 15. OUR FIRST IDEA WAS TO IMPLEMENT A CDC PATTERN RETRIEVING THE DATA FROM THE DATABASE. TO DO SO WE NEEDED TO CREATE A CONNECT AND WE DECIDED TO USE DEBEZIUM AS OUR SOURCE CONNECTOR TO RETRIEVE ALL DATA FROM THE DATABASE BINLOG AND INSERT THEM INTO THE KAFKA CONNECT'S TOPIC. Just a phrase from the article WHAT WE’RE AIMING?
  • 16. OUR FINAL ARCHITECTURE USING KAFKA INVOICE’S CURRENT ARCHITECTURE INVOICE-API DATA BASE INVOICE- SYNC ORDER-API RETRIEVES DATA FROM THE BINLOG FILE INSERT DOCUMENTS ELASTIC SEARCH KAFKA-CONNECT Database connector ZOOKEEPER KAFKA CLUSTER KAFKA BROKER KAFKA BROKER KAFKA BROKER PRODUCE EVENTS RETRIEVES DATA FROM TOPIC GETS INVOICE FROM ID RETRIEVE PAYMENT INFO PRODUCES TRANSFORMED EVENT KAFKA-CONNECT Elastic search connector RETRIEVES DATA FROM TOPIC
  • 17. WHAT WE DID GOOD? WHAT WAS OUR HITS? ▸ We've a really stable and robust environment, about twenty projects are already using Kafka streams at Wirecard Brazil ▸ We reduced considerable the amount of tickets opened because of missing or out of date resources ▸ The invoice api had a memory leak that every now and then would shutdown the application, not anymore ▸ While is true that the invoice api uses kafka exclusively to produces documents to its elastic search, we're already producing events of invoices so any application that wants to work with those resources are able to get them without requesting data from the invoice api, thus not overloading it.
  • 19. WHAT WE LEARNED? WHAT HAPPENED? ▸ We started with a single kafka connect to rule all connectors across all applications, it didn't took long for us to realize that we were back to the reports-api problem. ▸ Pay attention to Kafka variables ▸ Load retroactive data ▸ Avro and bad parsed resource ▸ A Kafka connect for each application ▸ Check your retention ▸ Kafka Manager ▸ Complexity and learning curve
  • 21. WHERE ARE WE HEADING NOW? WHAT IS NEXT? ▸ There are several applications that we’ve that aren’t using Kafka ▸ We still have some applications using Reports service ▸ Some applications are not using Avro ▸ Infrastructure as a code, immutable. ▸ We should update our Kafka version ▸ Try the new Cloud-Native Experience for Kafka
  • 22. THERE IS ALSO A POST IN THE MEDIUM LINK TO THE ARTICLE You can find it at my Medium account, https://medium.com/@caueferreira
  • 23. WHERE CAN I FIND THIS PRESENTATION LINK TO THE PRESENTATION You can also find it at my LinkedIn account, https://linkedin.com/in/caueferreira