SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Nklmish
@nklmish
(SPRING) KAFKA - ONE MORE ARSENAL IN A
DISTRIBUTED TOOLBOX

“Therefore, just as water retains no constant shape, so in
warfare there are no constant conditions” - Sun Tzu
About me
•Independent consultant & contractor

•OSS contributor.

•Works for 

•Blog https://nklmish.wordpress.com/
•Swedish startup founded in 2012.

•Strong advocate of DDD & CQRS.

•Event store with billions of events.

•Millions of events every day.

•Every event is EQUALLY important - “I was thinking I might win 50 pounds
but when it went all the way to the jackpot I was shocked.” - Mega Fortune
£2,700,000 jackpot won on the 3rd spin.

•And… we have an amazing culture.
Do you Like Lego?
Simplicity is the key to complexity
You build complex system
Starting with a simple idea
Kafka in a nutshell
Kafka - NOT a service bus
•ESB - Integrate legacy & off the shelf systems.

•Messaging layer (Low throughput).

•Central teams governance (validations, schemas, etc.).

•Beware : Stay away from recreating ESB antipatterns with Kafka. 

•
Kafka - more than a message queue
•Supports both Point-to-point & publish-subscribe

•Extremely fast

•Massive msg throughput

•Msg replaying + retention

•Doesn’t slow down as the no. of consumers increases.

•Scalable

•Stronger ordering guarantees than a traditional messaging system
How
com
e?
Traditional queue, ordering guarantees
C0
C1
C2
Parallelconsumption
R0 R1 R2 R3 …
Server side: Queue retains records in-order
Async delivery
t=1, R0
t=2, R2
t=0, R1
M
essaging
system
solves
this
via
“exclusive
consum
er”
Kafka, ordering guarantees
R0 R1 R2 R3 …
Partition- 0
R0 R1 R2 R3 …
Partition- 1
R0 R1 R2 R3 …
Partition- 2
R0 R1 R2 R3 …
Partition- 3
Topic-X ConsumerGroup-foo
C1
Kafka, ordering guarantees
R0 R1 R2 R3 …
Partition- 0
R0 R1 R2 R3 …
Partition- 1
R0 R1 R2 R3 …
Partition- 2
R0 R1 R2 R3 …
Partition- 3
Topic-X ConsumerGroup-foo
C1
C2
Kafka, a database inside out
Kafka
Commit Log
Stream
Processor
KSQ
L
Kafka
Caching
Indexes
Query engine
Commit log
Traditional database
Kafka Is A Streaming Platform
Kafka, a streaming platform
Kafka
Streaming API (can be stateful)
Kafka Streams & KSQL
Utilities
Schema Registry, Replicator, Mirror Maker, confluent platform
Communication API
API Clients
…
Connector API
Pull & push data to/from, Kafka (S3, JDBC, HDFS…)
Our Challenge
Traditional Messaging + Distributed System = Our Challenge
Three Challenges
•Scalability

•Speed

•Resiliency
Sounds
Fam
iliar?
“In the midst of chaos, there is also opportunity”
Sun Tzu
MOM vs.
Kafka
Broker Centric Approach Client Centric Approach
Index structures (Btree or Hash Tables) Log structured
Retention impacts performance Designed for Retention
Outrage: Significant slow down
Outrage: won’t cause infrastructure to slow
down significantly
Really?
“Immutability changes everything”
Pat Helland
Scalability Comes From Simplicity
Simplicity - Partitioned Log
Log (append only journal)
Reads (single seek & scan)
Writes (Append only)
Caching Comes From Simplicity - Sequential Disk Access
•Relies heavily on the filesystem for storing & caching messages

•Cache will stay warm even if the service is restarted.
Massive Throughput - Comes From Simplicity
•Zero copy - while reading the data is copied directly from disk
buffer to the network buffer; bypassing importing into JVM; In a
nutshell we can saturate the network.
java.nio.channels.File
Channel#transferTo()
Logs Scaling - Comes From Simplicity
Writes Velocity - Comes From Simplicity
Kafka
Sync()
Operation
Avoids flushing i.e.
Replication
Achieves via
Kafka Broker

(with 64 GB of
RAM)
Conclusion
Operates 1000x Faster Than Traditional
Messaging system
Replication built into the low-level design
Resiliency - Comes From Replication
•In sync replicas
Spring Kafka
Spring Kafka
•Spring ecosystem at disposal.

(e.g. Spring Integration)

•Headers improvements.

•Kafka Streams Support.

•Testing made easier.

• Embedded Kafka.

• TestUtils (conditions, helper-methods, etc).
DEMO
What we achieved so far
•Parallel Consumer Reads - 3,080,000/sec
•Single Producer Writes - 640,000/sec
•Total events : 30+ Billion events

•Replay time < 3-5 Hours

•NOTE : We hit hardware limitations rather than Kafka’s.
Nklmish
@nklmish
THANK YOU
FEEDBACK

Más contenido relacionado

La actualidad más candente

Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandraJon Haddad
 
REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)Ameya Vijay Gokhale
 
Running Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureRunning Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureSimon Evans
 
Evolution of server environments
Evolution of server environmentsEvolution of server environments
Evolution of server environmentsvpetersson
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012Chris Westin
 
SQL Server Features That Will Blow Your Mind!
SQL Server Features That Will Blow Your Mind!SQL Server Features That Will Blow Your Mind!
SQL Server Features That Will Blow Your Mind!Ed Leighton-Dick
 
Introduction to Cassandra - Denver
Introduction to Cassandra - DenverIntroduction to Cassandra - Denver
Introduction to Cassandra - DenverJon Haddad
 
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhOGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhBuff Nguyen
 
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy BreakpointsFont End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy BreakpointsOPIN Software Inc.
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraJon Haddad
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core ConceptsJon Haddad
 
An Introduction to Membase
An Introduction to MembaseAn Introduction to Membase
An Introduction to MembaseTim Lossen
 
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte IEscalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte ILeandro Silva
 
MySQL Resources
MySQL ResourcesMySQL Resources
MySQL Resourcesradiocats
 

La actualidad más candente (20)

Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandra
 
REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)REDIS (Remote Dictionary Server)
REDIS (Remote Dictionary Server)
 
Running Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureRunning Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows Azure
 
SPA vs. MPA
SPA vs. MPASPA vs. MPA
SPA vs. MPA
 
Dev-Friendly Ops
Dev-Friendly OpsDev-Friendly Ops
Dev-Friendly Ops
 
Evolution of server environments
Evolution of server environmentsEvolution of server environments
Evolution of server environments
 
mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012mongodb-brief-intro-february-2012
mongodb-brief-intro-february-2012
 
SQL Server Features That Will Blow Your Mind!
SQL Server Features That Will Blow Your Mind!SQL Server Features That Will Blow Your Mind!
SQL Server Features That Will Blow Your Mind!
 
In Memory Cahce Structure
In Memory Cahce StructureIn Memory Cahce Structure
In Memory Cahce Structure
 
Introduction to Cassandra - Denver
Introduction to Cassandra - DenverIntroduction to Cassandra - Denver
Introduction to Cassandra - Denver
 
Dynamicly Scale Weblogic in the private Cloud clusters
Dynamicly Scale Weblogic in the private Cloud clusters   Dynamicly Scale Weblogic in the private Cloud clusters
Dynamicly Scale Weblogic in the private Cloud clusters
 
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhOGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
 
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy BreakpointsFont End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
Font End Development and Drupal: Gulp, Sass, Susy, and Mappy Breakpoints
 
Diagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - CassandraDiagnosing Problems in Production - Cassandra
Diagnosing Problems in Production - Cassandra
 
JEE session 1
JEE session 1JEE session 1
JEE session 1
 
RavenDB in the wild
RavenDB in the wildRavenDB in the wild
RavenDB in the wild
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
An Introduction to Membase
An Introduction to MembaseAn Introduction to Membase
An Introduction to Membase
 
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte IEscalabilidade com Lambda e Elastic Beanstalk – Parte I
Escalabilidade com Lambda e Elastic Beanstalk – Parte I
 
MySQL Resources
MySQL ResourcesMySQL Resources
MySQL Resources
 

Similar a (SPRING)KAFKA - ONE MORE ARSENAL IN A DISTRIBUTED TOOLBOX

Web Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodeWeb Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodePurnima Kamath
 
kafka simplicity and complexity
kafka simplicity and complexitykafka simplicity and complexity
kafka simplicity and complexityPaolo Platter
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...DataStax Academy
 
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 20190-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019confluent
 
Sink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleSink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleTimothy Spann
 
Sink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleSink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleScyllaDB
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Guido Schmutz
 
Streaming ETL with Apache Kafka and KSQL
Streaming ETL with Apache Kafka and KSQLStreaming ETL with Apache Kafka and KSQL
Streaming ETL with Apache Kafka and KSQLNick Dearden
 
Paris jug ksql - 2018-06-28
Paris jug ksql - 2018-06-28Paris jug ksql - 2018-06-28
Paris jug ksql - 2018-06-28Florent Ramiere
 
ksqlDB Workshop
ksqlDB WorkshopksqlDB Workshop
ksqlDB Workshopconfluent
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Bob Pusateri
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Erik Onnen
 
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionSQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionMark Broadbent
 
Connecting Akka with Oracle Event Hub Cloud Service
Connecting Akka with Oracle Event Hub Cloud ServiceConnecting Akka with Oracle Event Hub Cloud Service
Connecting Akka with Oracle Event Hub Cloud ServiceDalibor Blazevic
 
10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache KafkaBen Stopford
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersNiko Neugebauer
 
Microservices in a Streaming World
Microservices in a Streaming WorldMicroservices in a Streaming World
Microservices in a Streaming WorldHans Jespersen
 
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...Lucas Jellema
 

Similar a (SPRING)KAFKA - ONE MORE ARSENAL IN A DISTRIBUTED TOOLBOX (20)

Web Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who CodeWeb Analytics using Kafka - August talk w/ Women Who Code
Web Analytics using Kafka - August talk w/ Women Who Code
 
kafka simplicity and complexity
kafka simplicity and complexitykafka simplicity and complexity
kafka simplicity and complexity
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
 
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 20190-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
0-60: Tesla's Streaming Data Platform ( Jesse Yates, Tesla) Kafka Summit SF 2019
 
Sink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleSink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any Scale
 
Sink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any ScaleSink Your Teeth into Streaming at Any Scale
Sink Your Teeth into Streaming at Any Scale
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Streaming ETL with Apache Kafka and KSQL
Streaming ETL with Apache Kafka and KSQLStreaming ETL with Apache Kafka and KSQL
Streaming ETL with Apache Kafka and KSQL
 
Paris jug ksql - 2018-06-28
Paris jug ksql - 2018-06-28Paris jug ksql - 2018-06-28
Paris jug ksql - 2018-06-28
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
 
ksqlDB Workshop
ksqlDB WorkshopksqlDB Workshop
ksqlDB Workshop
 
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
Select Stars: A SQL DBA's Introduction to Azure Cosmos DB (SQL Saturday Orego...
 
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
Data Models and Consumer Idioms Using Apache Kafka for Continuous Data Stream...
 
Kafka - Linkedin's messaging backbone
Kafka - Linkedin's messaging backboneKafka - Linkedin's messaging backbone
Kafka - Linkedin's messaging backbone
 
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 EditionSQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
SQL Server AlwaysOn for Dummies SQLSaturday #202 Edition
 
Connecting Akka with Oracle Event Hub Cloud Service
Connecting Akka with Oracle Event Hub Cloud ServiceConnecting Akka with Oracle Event Hub Cloud Service
Connecting Akka with Oracle Event Hub Cloud Service
 
10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka10 Principals for Effective Event-Driven Microservices with Apache Kafka
10 Principals for Effective Event-Driven Microservices with Apache Kafka
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
 
Microservices in a Streaming World
Microservices in a Streaming WorldMicroservices in a Streaming World
Microservices in a Streaming World
 
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...
Introducing Apache Kafka and why it is important to Oracle, Java and IT profe...
 

Más de nklmish

Demystifying Kafka
Demystifying KafkaDemystifying Kafka
Demystifying Kafkanklmish
 
Scaling CQRS in theory, practice, and reality
Scaling CQRS in theory, practice, and realityScaling CQRS in theory, practice, and reality
Scaling CQRS in theory, practice, and realitynklmish
 
CQRS and EventSourcing with Spring & Axon
CQRS and EventSourcing with Spring & AxonCQRS and EventSourcing with Spring & Axon
CQRS and EventSourcing with Spring & Axonnklmish
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivitynklmish
 
Distributed tracing - get a grasp on your production
Distributed tracing - get a grasp on your productionDistributed tracing - get a grasp on your production
Distributed tracing - get a grasp on your productionnklmish
 
Microservice no fluff, the REAL stuff
Microservice no fluff, the REAL stuffMicroservice no fluff, the REAL stuff
Microservice no fluff, the REAL stuffnklmish
 
Mongo - an intermediate introduction
Mongo - an intermediate introductionMongo - an intermediate introduction
Mongo - an intermediate introductionnklmish
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Dockernklmish
 

Más de nklmish (10)

Demystifying Kafka
Demystifying KafkaDemystifying Kafka
Demystifying Kafka
 
Scaling CQRS in theory, practice, and reality
Scaling CQRS in theory, practice, and realityScaling CQRS in theory, practice, and reality
Scaling CQRS in theory, practice, and reality
 
CQRS and EventSourcing with Spring & Axon
CQRS and EventSourcing with Spring & AxonCQRS and EventSourcing with Spring & Axon
CQRS and EventSourcing with Spring & Axon
 
Kotlin boost yourproductivity
Kotlin boost yourproductivityKotlin boost yourproductivity
Kotlin boost yourproductivity
 
Distributed tracing - get a grasp on your production
Distributed tracing - get a grasp on your productionDistributed tracing - get a grasp on your production
Distributed tracing - get a grasp on your production
 
Spock
SpockSpock
Spock
 
Microservice no fluff, the REAL stuff
Microservice no fluff, the REAL stuffMicroservice no fluff, the REAL stuff
Microservice no fluff, the REAL stuff
 
Neo4J
Neo4JNeo4J
Neo4J
 
Mongo - an intermediate introduction
Mongo - an intermediate introductionMongo - an intermediate introduction
Mongo - an intermediate introduction
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

(SPRING)KAFKA - ONE MORE ARSENAL IN A DISTRIBUTED TOOLBOX

  • 1. Nklmish @nklmish (SPRING) KAFKA - ONE MORE ARSENAL IN A DISTRIBUTED TOOLBOX
 “Therefore, just as water retains no constant shape, so in warfare there are no constant conditions” - Sun Tzu
  • 2. About me •Independent consultant & contractor •OSS contributor. •Works for •Blog https://nklmish.wordpress.com/
  • 3. •Swedish startup founded in 2012. •Strong advocate of DDD & CQRS. •Event store with billions of events. •Millions of events every day. •Every event is EQUALLY important - “I was thinking I might win 50 pounds but when it went all the way to the jackpot I was shocked.” - Mega Fortune £2,700,000 jackpot won on the 3rd spin. •And… we have an amazing culture.
  • 4. Do you Like Lego?
  • 5.
  • 6.
  • 7. Simplicity is the key to complexity
  • 9. Starting with a simple idea
  • 10. Kafka in a nutshell
  • 11. Kafka - NOT a service bus •ESB - Integrate legacy & off the shelf systems. •Messaging layer (Low throughput). •Central teams governance (validations, schemas, etc.). •Beware : Stay away from recreating ESB antipatterns with Kafka. •
  • 12. Kafka - more than a message queue •Supports both Point-to-point & publish-subscribe •Extremely fast •Massive msg throughput •Msg replaying + retention •Doesn’t slow down as the no. of consumers increases. •Scalable •Stronger ordering guarantees than a traditional messaging system How com e?
  • 13. Traditional queue, ordering guarantees C0 C1 C2 Parallelconsumption R0 R1 R2 R3 … Server side: Queue retains records in-order Async delivery t=1, R0 t=2, R2 t=0, R1 M essaging system solves this via “exclusive consum er”
  • 14. Kafka, ordering guarantees R0 R1 R2 R3 … Partition- 0 R0 R1 R2 R3 … Partition- 1 R0 R1 R2 R3 … Partition- 2 R0 R1 R2 R3 … Partition- 3 Topic-X ConsumerGroup-foo C1
  • 15. Kafka, ordering guarantees R0 R1 R2 R3 … Partition- 0 R0 R1 R2 R3 … Partition- 1 R0 R1 R2 R3 … Partition- 2 R0 R1 R2 R3 … Partition- 3 Topic-X ConsumerGroup-foo C1 C2
  • 16. Kafka, a database inside out Kafka Commit Log Stream Processor KSQ L Kafka Caching Indexes Query engine Commit log Traditional database
  • 17. Kafka Is A Streaming Platform
  • 18. Kafka, a streaming platform Kafka Streaming API (can be stateful) Kafka Streams & KSQL Utilities Schema Registry, Replicator, Mirror Maker, confluent platform Communication API API Clients … Connector API Pull & push data to/from, Kafka (S3, JDBC, HDFS…)
  • 20. Traditional Messaging + Distributed System = Our Challenge
  • 23. “In the midst of chaos, there is also opportunity” Sun Tzu
  • 24. MOM vs. Kafka Broker Centric Approach Client Centric Approach Index structures (Btree or Hash Tables) Log structured Retention impacts performance Designed for Retention Outrage: Significant slow down Outrage: won’t cause infrastructure to slow down significantly
  • 28. Simplicity - Partitioned Log Log (append only journal) Reads (single seek & scan) Writes (Append only)
  • 29. Caching Comes From Simplicity - Sequential Disk Access •Relies heavily on the filesystem for storing & caching messages •Cache will stay warm even if the service is restarted.
  • 30. Massive Throughput - Comes From Simplicity •Zero copy - while reading the data is copied directly from disk buffer to the network buffer; bypassing importing into JVM; In a nutshell we can saturate the network. java.nio.channels.File Channel#transferTo()
  • 31. Logs Scaling - Comes From Simplicity
  • 32. Writes Velocity - Comes From Simplicity Kafka Sync() Operation Avoids flushing i.e. Replication Achieves via Kafka Broker
 (with 64 GB of RAM) Conclusion Operates 1000x Faster Than Traditional Messaging system Replication built into the low-level design
  • 33. Resiliency - Comes From Replication •In sync replicas
  • 35. Spring Kafka •Spring ecosystem at disposal.
 (e.g. Spring Integration) •Headers improvements. •Kafka Streams Support. •Testing made easier. • Embedded Kafka. • TestUtils (conditions, helper-methods, etc).
  • 36. DEMO
  • 37. What we achieved so far •Parallel Consumer Reads - 3,080,000/sec •Single Producer Writes - 640,000/sec •Total events : 30+ Billion events •Replay time < 3-5 Hours •NOTE : We hit hardware limitations rather than Kafka’s.