SlideShare a Scribd company logo
1 of 19
Enterprise Wide Publish / Subscribe Models
With Apache Kafka
Johan Louwers – Global Lead Architect
2Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Application
Schema C
Database
Application (backend)
Client Device / Client Application
Schema B
Schema A
UI Rendering Logic
Application Logic
Interface Logic
ExternalSystems
Monolithic Architecture
Still used today
Monolithic Architecture
- Commonly seen in traditional large scale enterprise
deployment
- Not flexible and hard to maintain
- Seen as a dead end
3Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
RESTAPI
Database
(micro)Service(s)
Service B
RESTAPI
Database
(micro)Service(s)
Service A
RESTAPI
Application (backend)
UI Applications & Application Backend Services
API gateway
Microservice Architecture
Decompose the monolith
Microservice Architecture
- Decomposition of the monolith
- Commonly deployed in containers of functions
- Commonly self scaling
- Commonly loosely coupled
- Commonly makes use of REST / gRPC
- Commonly makes use isolated persistence
4Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
RESTAPI
Database
(micro)Service(s)
Service B
RESTAPI
Database
(micro)Service(s)
Service A
RESTAPI
Application (backend)
API gateway
UI Applications & Application Backend Services
Microservice Architecture
Distribute transactions (option 1)
Microservice Architecture
Distributed transactions over multiple services
- UI calls all services involved in a business
transaction
- High changes of inconsistency
- Complex UI logic and hard to maintain
5Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
RESTAPI
Database
(micro)Service(s)
Service B
RESTAPI
Database
(micro)Service(s)
Service A
RESTAPI
Application (backend)
API gateway
UI Applications & Application Backend Services
Microservice Architecture
Distribute transactions (option 2)
Microservice Architecture
Distributed transactions over multiple services
- UI calls initial service for business transaction
- Service propagate transaction to other services
- High level of point 2 point connections
- Complex to add new services
6Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
Microservice Architecture
Distribute transactions (option 3)
Microservice Architecture
Distributed transactions over multiple services
- UI calls initial service for business transaction
- Service publish event to a Kafka topic
- A topic can be read by every subscriber
- Care about your consumers by not caring
7Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
Microservice Architecture
Distribute transactions (option 3)
Microservice Architecture
All services are publishers
- “event” : a significant change of state
- Do not share the data, share the event
- CRUD events:
- CREATE & UPDATE : standard
- DELETE : do you really want that?
- READ : on some very specific cases
{
"event": {
"event_topic": "customerdata",
"event_type": "create",
"event_application": "CRMAPAC",
"event_service": "customers",
"event_data_object": "deliveryLocations",
"event_data_location": "https://api.crmapac.acme.com/customers/1264/deliveryLocations/26/",
"classification": {
"classified_gdpr": true,
"classified_internalviews": true,
"classified_publicviews": false,
"classified_privateviews": true
}
}
}
8Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
from kafka import KafkaProducer
from kafka.errors import KafkaError
producer = KafkaProducer(bootstrap_servers=['broker1:1234'])
# Asynchronous by default
future = producer.send('my-topic', b'raw_bytes')
# Block for 'synchronous' sends
try:
record_metadata = future.get(timeout=10)
except KafkaError:
# Decide what to do if produce request failed...
log.exception()
pass
# Successful result returns assigned partition and offset
print (record_metadata.topic)
print (record_metadata.partition)
print (record_metadata.offset)
# produce keyed messages to enable hashed partitioning
producer.send('my-topic', key=b'foo', value=b'bar')
# encode objects via msgpack
producer = KafkaProducer(value_serializer=msgpack.dumps)
producer.send('msgpack-topic', {'key': 'value'})
# produce json messages
producer = KafkaProducer(value_serializer=lambda m: json.dumps(m).encode('ascii'))
producer.send('json-topic', {'key': 'value'})
# produce asynchronously
for _ in range(100):
producer.send('my-topic', b'msg')
def on_send_success(record_metadata):
print(record_metadata.topic)
print(record_metadata.partition)
print(record_metadata.offset)
def on_send_error(excp):
log.error('I am an errback', exc_info=excp)
# handle exception
# produce asynchronously with callbacks
producer.send('my-topic', b'raw_bytes').add_callback(on_send_success).add_errback(on_send_error)
# block until all async messages are sent
producer.flush()
# configure multiple retries
producer = KafkaProducer(retries=5)
Microservice Architecture
Distribute transactions (option 3)
9Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
Microservice Architecture
Distribute transactions (option 3)
Microservice Architecture
Services can be a subscriber
- Easily add new services by subscribing to topics
- Kafka topic consumption:
- REST API / Native Kafka client
- PULL/PUSH
- Subscriber defines the required actions on an event
- Subscriber calls publisher server API to obtain data
- Data should never be stored outside the context of
the owning service
- or with care and understanding{
"event": {
"event_topic": "customerdata",
"event_type": "create",
"event_application": "CRMAPAC",
"event_service": "customers",
"event_data_object": "deliveryLocations",
"event_data_location": "https://api.crmapac.acme.com/customers/1264/deliveryLocations/26/",
"classification": {
"classified_gdpr": true,
"classified_internalviews": true,
"classified_publicviews": false,
"classified_privateviews": true
}
}
}
10Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
from kafka import KafkaConsumer
# To consume latest messages and auto-commit offsets
consumer = KafkaConsumer('my-topic',
group_id='my-group',
bootstrap_servers=['localhost:9092'])
for message in consumer:
# message value and key are raw bytes -- decode if necessary!
# e.g., for unicode: `message.value.decode('utf-8')`
print ("%s:%d:%d: key=%s value=%s" % (message.topic, message.partition,
message.offset, message.key,
message.value))
# consume earliest available messages, don't commit offsets
KafkaConsumer(auto_offset_reset='earliest', enable_auto_commit=False)
# consume json messages
KafkaConsumer(value_deserializer=lambda m: json.loads(m.decode('ascii')))
# consume msgpack
KafkaConsumer(value_deserializer=msgpack.unpackb)
# StopIteration if no message after 1sec
KafkaConsumer(consumer_timeout_ms=1000)
# Subscribe to a regex topic pattern
consumer = KafkaConsumer()
consumer.subscribe(pattern='^awesome.*')
# Use multiple consumers in parallel w/ 0.9 kafka brokers
# typically you would run each on a different server / process / CPU
consumer1 = KafkaConsumer('my-topic',
group_id='my-group',
bootstrap_servers='my.server.com')
consumer2 = KafkaConsumer('my-topic',
group_id='my-group',
bootstrap_servers='my.server.com')
Microservice Architecture
Distribute transactions (option 3)
11Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
API gateway
External API ServiceExt consumers
Microservice Architecture
Inform the world
Microservice Architecture
Enable the “world” to subscribe as much as possible
- Allow all known services to subscribe to topics
- Allow unknown parties to subscribe to topic via the
external service API
- Ensure both known (internal) and unknown
(external) parties can only access the data in a
secured manner (OAUTH2)
12Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Database
(micro)Service(s)
Service C
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service B
Subscribe
r
Publisher
RESTAPI
Database
(micro)Service(s)
Service A
Subscribe
r
Publisher
RESTAPI
KafkaPub/Sub
Application (backend)
UI Applications
App. Backend
Services
External API ServiceExt consumers
Outbound WebHook
Ext/Int
subscribers
Microservice Architecture
Inform the world
Microservice Architecture
Enable the “world” to subscribe as much as possible
- Do provide the option to subscribe to a webhook
- Push updates to HTTP(S) endpoints
- Prevent aggressive polling
- Allows for notification “spreading”
- Prevent request storms
API gateway
13Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Kafka Pub/Sub
External API ServiceOutbound WebHook
External Consumers
Application 1
(backend)
Application 3
(backend)
Application 2
(backend)
Microservice Architecture
Inform everyone
Microservice Architecture
Simplify the picture
- External and internal consumers
- Provide APIs, native clients and webhooks
- Strive for an event driven architecture
14Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Kafka Pub/Sub
External API ServiceOutbound WebHook
External Consumers
Application 1
(backend)
Application 3
(backend)
Application 2
(backend)
Remember – It is NOT a database
More than pub/sub - KSQL
Kafka, more than pub/sub
Query kafka
- Allow developers to query Kafka
- Stream analytics
- KSQL, a bit more than SQL
- Kafka is NOT a database
- Keep retention costs in mind
15Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
Kafka Pub/Sub
External API ServiceOutbound WebHook
External Consumers
Application 1
(backend)
Application 3
(backend)
Application 2
(backend)
CREATE STREAM pageviews 
(viewtime BIGINT, 
userid VARCHAR, 
gender VARCHAR, 
regionid VARCHAR, 
pageid VARCHAR) 
WITH (KAFKA_TOPIC='pageviews', 
VALUE_FORMAT='DELIMITED');
SELECT regionid, COUNT(*) FROM pageviews 
WINDOW HOPPING (SIZE 30 SECONDS, ADVANCE BY 10 SECONDS) 
WHERE UCASE(gender)='FEMALE' AND LCASE (regionid) LIKE '%_6' 
GROUP BY regionid;
Remember – It is NOT a database
More than pub/sub - KSQL
16Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
DC - A
How to deploy Kafka
Make it high available
Make it High Available
It is harder than you think
- Single DC cluster
- Issues with DC failure
- Stretched DC cluster
- Issues with split brain and CAP theorem
- Cluster per DC
- Issues with topic sync
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node A-
0
DC - B
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node B-
0
DC - A
Kafka node AKafka node 0
DC - B
Kafka node AKafka node 2
DC - A
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node A-
0
DC - B
17Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved.
DC - A
How to get Kafka
Build versus buy versus consume
Kafka provides a high value
It comes with a lot of complexity
- Build (& deploy)
- Invest in a R&D and development
- Invest in (virtual HW)
- You build it you run it
- You know and own everything
- Buy
- High support costs
- Invest in (virtual HW)
- Still requires deep knowledge
- Could require a maintenance partner
- Consume
- Pay-per-use PaaS models
- Most solutions are in the cloud
- Some solutions are private cloud on converged
infra
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node A-
0
DC - B
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node B-
0
DC - A
Kafka node AKafka node 0
DC - B
Kafka node AKafka node 2
DC - A
Kafka node A-
3
Kafka node A-
2
Kafka node A-
1
Kafka node A-
0
DC - B
Thank you
Enterprise wide publish subscribe with Apache Kafka

More Related Content

What's hot

Machine Learning with Apache Kafka in Pharma and Life Sciences
Machine Learning with Apache Kafka in Pharma and Life SciencesMachine Learning with Apache Kafka in Pharma and Life Sciences
Machine Learning with Apache Kafka in Pharma and Life Sciences
Kai Wähner
 
The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022
Kai Wähner
 
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Kai Wähner
 
Mainframe Integration, Offloading and Replacement with Apache Kafka
Mainframe Integration, Offloading and Replacement with Apache KafkaMainframe Integration, Offloading and Replacement with Apache Kafka
Mainframe Integration, Offloading and Replacement with Apache Kafka
Kai Wähner
 
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake ArchitectureServerless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Kai Wähner
 

What's hot (20)

Machine Learning with Apache Kafka in Pharma and Life Sciences
Machine Learning with Apache Kafka in Pharma and Life SciencesMachine Learning with Apache Kafka in Pharma and Life Sciences
Machine Learning with Apache Kafka in Pharma and Life Sciences
 
Confluent Platform 5.5 + Apache Kafka 2.5 => New Features (JSON Schema, Proto...
Confluent Platform 5.5 + Apache Kafka 2.5 => New Features (JSON Schema, Proto...Confluent Platform 5.5 + Apache Kafka 2.5 => New Features (JSON Schema, Proto...
Confluent Platform 5.5 + Apache Kafka 2.5 => New Features (JSON Schema, Proto...
 
Apache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, ArchitecturesApache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
Apache Kafka and MQTT - Overview, Comparison, Use Cases, Architectures
 
The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022The Top 5 Apache Kafka Use Cases and Architectures in 2022
The Top 5 Apache Kafka Use Cases and Architectures in 2022
 
IoT Architectures for Apache Kafka and Event Streaming - Industry 4.0, Digita...
IoT Architectures for Apache Kafka and Event Streaming - Industry 4.0, Digita...IoT Architectures for Apache Kafka and Event Streaming - Industry 4.0, Digita...
IoT Architectures for Apache Kafka and Event Streaming - Industry 4.0, Digita...
 
Apache Kafka in the Transportation and Logistics
Apache Kafka in the Transportation and LogisticsApache Kafka in the Transportation and Logistics
Apache Kafka in the Transportation and Logistics
 
Streaming IBM i to Kafka for Next-Gen Use Cases
Streaming IBM i to Kafka for Next-Gen Use CasesStreaming IBM i to Kafka for Next-Gen Use Cases
Streaming IBM i to Kafka for Next-Gen Use Cases
 
Connected Vehicles and V2X with Apache Kafka
Connected Vehicles and V2X with Apache KafkaConnected Vehicles and V2X with Apache Kafka
Connected Vehicles and V2X with Apache Kafka
 
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
Architecture patterns for distributed, hybrid, edge and global Apache Kafka d...
 
Event Streaming CTO Roundtable for Cloud-native Kafka Architectures
Event Streaming CTO Roundtable for Cloud-native Kafka ArchitecturesEvent Streaming CTO Roundtable for Cloud-native Kafka Architectures
Event Streaming CTO Roundtable for Cloud-native Kafka Architectures
 
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
Simplified Machine Learning Architecture with an Event Streaming Platform (Ap...
 
Mainframe Integration, Offloading and Replacement with Apache Kafka
Mainframe Integration, Offloading and Replacement with Apache KafkaMainframe Integration, Offloading and Replacement with Apache Kafka
Mainframe Integration, Offloading and Replacement with Apache Kafka
 
Apache Kafka in the Healthcare Industry
Apache Kafka in the Healthcare IndustryApache Kafka in the Healthcare Industry
Apache Kafka in the Healthcare Industry
 
Apache Kafka, Tiered Storage and TensorFlow for Streaming Machine Learning wi...
Apache Kafka, Tiered Storage and TensorFlow for Streaming Machine Learning wi...Apache Kafka, Tiered Storage and TensorFlow for Streaming Machine Learning wi...
Apache Kafka, Tiered Storage and TensorFlow for Streaming Machine Learning wi...
 
Apache Kafka and Blockchain - Comparison and a Kafka-native Implementation
Apache Kafka and Blockchain - Comparison and a Kafka-native ImplementationApache Kafka and Blockchain - Comparison and a Kafka-native Implementation
Apache Kafka and Blockchain - Comparison and a Kafka-native Implementation
 
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake ArchitectureServerless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
 
Confluent Operator as Cloud-Native Kafka Operator for Kubernetes
Confluent Operator as Cloud-Native Kafka Operator for KubernetesConfluent Operator as Cloud-Native Kafka Operator for Kubernetes
Confluent Operator as Cloud-Native Kafka Operator for Kubernetes
 
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes EverythingThe Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
 
Apache Kafka as Event Streaming Platform for Microservice Architectures
Apache Kafka as Event Streaming Platform for Microservice ArchitecturesApache Kafka as Event Streaming Platform for Microservice Architectures
Apache Kafka as Event Streaming Platform for Microservice Architectures
 
Apache Kafka for Real-time Supply Chain in the Food and Retail Industry
Apache Kafka for Real-time Supply Chainin the Food and Retail IndustryApache Kafka for Real-time Supply Chainin the Food and Retail Industry
Apache Kafka for Real-time Supply Chain in the Food and Retail Industry
 

Similar to Enterprise wide publish subscribe with Apache Kafka

Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Kai Wähner
 
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
 

Similar to Enterprise wide publish subscribe with Apache Kafka (20)

Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
 
Cloud Native with Kyma
Cloud Native with KymaCloud Native with Kyma
Cloud Native with Kyma
 
IoT and Event Streaming at Scale with Apache Kafka
IoT and Event Streaming at Scale with Apache KafkaIoT and Event Streaming at Scale with Apache Kafka
IoT and Event Streaming at Scale with Apache Kafka
 
Introduction to Apache Kafka and why it matters - Madrid
Introduction to Apache Kafka and why it matters - MadridIntroduction to Apache Kafka and why it matters - Madrid
Introduction to Apache Kafka and why it matters - Madrid
 
Event Mesh Presentation at Gartner AADI Mumbai
Event Mesh Presentation at Gartner AADI MumbaiEvent Mesh Presentation at Gartner AADI Mumbai
Event Mesh Presentation at Gartner AADI Mumbai
 
Kafka Vienna Meetup 020719
Kafka Vienna Meetup 020719Kafka Vienna Meetup 020719
Kafka Vienna Meetup 020719
 
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
Apache Kafka vs. Traditional Middleware (Kai Waehner, Confluent) Frankfurt 20...
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
 
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniertFast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
 
Keine Angst vorm Dinosaurier: Mainframe-Integration und -Offloading mit Confl...
Keine Angst vorm Dinosaurier: Mainframe-Integration und -Offloading mit Confl...Keine Angst vorm Dinosaurier: Mainframe-Integration und -Offloading mit Confl...
Keine Angst vorm Dinosaurier: Mainframe-Integration und -Offloading mit Confl...
 
Spark and machine learning in microservices architecture
Spark and machine learning in microservices architectureSpark and machine learning in microservices architecture
Spark and machine learning in microservices architecture
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB)
 
How to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent IIHow to Build Streaming Apps with Confluent II
How to Build Streaming Apps with Confluent II
 
Event-Based API Patterns and Practices
Event-Based API Patterns and PracticesEvent-Based API Patterns and Practices
Event-Based API Patterns and Practices
 
Kubernetes, Istio and Knative - noteworthy practical experience
Kubernetes, Istio and Knative - noteworthy practical experienceKubernetes, Istio and Knative - noteworthy practical experience
Kubernetes, Istio and Knative - noteworthy practical experience
 
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...
 
Set Your Data In Motion - CTO Roundtable
Set Your Data In Motion - CTO RoundtableSet Your Data In Motion - CTO Roundtable
Set Your Data In Motion - CTO Roundtable
 
Bloomberg API Open Source Development and Solution Providers India
Bloomberg API Open Source Development and Solution Providers IndiaBloomberg API Open Source Development and Solution Providers India
Bloomberg API Open Source Development and Solution Providers India
 
apidays LIVE JAKARTA - Event Driven APIs by Phil Scanlon
apidays LIVE JAKARTA - Event Driven APIs by Phil Scanlonapidays LIVE JAKARTA - Event Driven APIs by Phil Scanlon
apidays LIVE JAKARTA - Event Driven APIs by Phil Scanlon
 

More from Johan Louwers

Multi Domain REST API routing for Data Mesh based Data Products
Multi Domain REST API routing for Data Mesh based Data ProductsMulti Domain REST API routing for Data Mesh based Data Products
Multi Domain REST API routing for Data Mesh based Data Products
Johan Louwers
 

More from Johan Louwers (20)

Multi Domain REST API routing for Data Mesh based Data Products
Multi Domain REST API routing for Data Mesh based Data ProductsMulti Domain REST API routing for Data Mesh based Data Products
Multi Domain REST API routing for Data Mesh based Data Products
 
TClab Dynamic Solar Panel Positioning Systems
TClab Dynamic Solar Panel Positioning SystemsTClab Dynamic Solar Panel Positioning Systems
TClab Dynamic Solar Panel Positioning Systems
 
Oracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps PipelinesOracle Cloud With Azure DevOps Pipelines
Oracle Cloud With Azure DevOps Pipelines
 
Oracle Cloud native functions - create application from cli
Oracle Cloud native functions - create application from cliOracle Cloud native functions - create application from cli
Oracle Cloud native functions - create application from cli
 
Oracle Labs - research mission & project potfolio
Oracle Labs - research mission & project potfolioOracle Labs - research mission & project potfolio
Oracle Labs - research mission & project potfolio
 
Install Redis on Oracle Linux
Install Redis on Oracle LinuxInstall Redis on Oracle Linux
Install Redis on Oracle Linux
 
Fn project quick installation guide
Fn project quick installation guideFn project quick installation guide
Fn project quick installation guide
 
Oracle python pandas merge DataFrames
Oracle python pandas merge DataFramesOracle python pandas merge DataFrames
Oracle python pandas merge DataFrames
 
import data from Oracle Database into Python Pandas Dataframe
import data from Oracle Database into Python Pandas Dataframeimport data from Oracle Database into Python Pandas Dataframe
import data from Oracle Database into Python Pandas Dataframe
 
Voice assistants for the insurance industry
Voice assistants for the insurance industry Voice assistants for the insurance industry
Voice assistants for the insurance industry
 
Industry 4.0 and Oracle Cloud
Industry 4.0 and Oracle CloudIndustry 4.0 and Oracle Cloud
Industry 4.0 and Oracle Cloud
 
Docker and microservices - moving from a monolith to microservices
Docker and microservices - moving from a monolith to microservicesDocker and microservices - moving from a monolith to microservices
Docker and microservices - moving from a monolith to microservices
 
Cloud native applications for banking
Cloud native applications for bankingCloud native applications for banking
Cloud native applications for banking
 
Conversational retail
Conversational retailConversational retail
Conversational retail
 
Oracle Cloudday security
Oracle Cloudday securityOracle Cloudday security
Oracle Cloudday security
 
Oracle Cloudday - the future of retail
Oracle Cloudday - the future of retailOracle Cloudday - the future of retail
Oracle Cloudday - the future of retail
 
Capgemini Oracle Cloud Access Security Broker
Capgemini Oracle Cloud Access Security BrokerCapgemini Oracle Cloud Access Security Broker
Capgemini Oracle Cloud Access Security Broker
 
Microservices in the oracle cloud
Microservices in the oracle cloudMicroservices in the oracle cloud
Microservices in the oracle cloud
 
Oracle cloud, private, public and hybrid
Oracle cloud, private, public and hybridOracle cloud, private, public and hybrid
Oracle cloud, private, public and hybrid
 
RethinkDB on Oracle Linux
RethinkDB on Oracle LinuxRethinkDB on Oracle Linux
RethinkDB on Oracle Linux
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
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
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
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
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
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
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 

Enterprise wide publish subscribe with Apache Kafka

  • 1. Enterprise Wide Publish / Subscribe Models With Apache Kafka Johan Louwers – Global Lead Architect
  • 2. 2Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Application Schema C Database Application (backend) Client Device / Client Application Schema B Schema A UI Rendering Logic Application Logic Interface Logic ExternalSystems Monolithic Architecture Still used today Monolithic Architecture - Commonly seen in traditional large scale enterprise deployment - Not flexible and hard to maintain - Seen as a dead end
  • 3. 3Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C RESTAPI Database (micro)Service(s) Service B RESTAPI Database (micro)Service(s) Service A RESTAPI Application (backend) UI Applications & Application Backend Services API gateway Microservice Architecture Decompose the monolith Microservice Architecture - Decomposition of the monolith - Commonly deployed in containers of functions - Commonly self scaling - Commonly loosely coupled - Commonly makes use of REST / gRPC - Commonly makes use isolated persistence
  • 4. 4Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C RESTAPI Database (micro)Service(s) Service B RESTAPI Database (micro)Service(s) Service A RESTAPI Application (backend) API gateway UI Applications & Application Backend Services Microservice Architecture Distribute transactions (option 1) Microservice Architecture Distributed transactions over multiple services - UI calls all services involved in a business transaction - High changes of inconsistency - Complex UI logic and hard to maintain
  • 5. 5Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C RESTAPI Database (micro)Service(s) Service B RESTAPI Database (micro)Service(s) Service A RESTAPI Application (backend) API gateway UI Applications & Application Backend Services Microservice Architecture Distribute transactions (option 2) Microservice Architecture Distributed transactions over multiple services - UI calls initial service for business transaction - Service propagate transaction to other services - High level of point 2 point connections - Complex to add new services
  • 6. 6Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway Microservice Architecture Distribute transactions (option 3) Microservice Architecture Distributed transactions over multiple services - UI calls initial service for business transaction - Service publish event to a Kafka topic - A topic can be read by every subscriber - Care about your consumers by not caring
  • 7. 7Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway Microservice Architecture Distribute transactions (option 3) Microservice Architecture All services are publishers - “event” : a significant change of state - Do not share the data, share the event - CRUD events: - CREATE & UPDATE : standard - DELETE : do you really want that? - READ : on some very specific cases { "event": { "event_topic": "customerdata", "event_type": "create", "event_application": "CRMAPAC", "event_service": "customers", "event_data_object": "deliveryLocations", "event_data_location": "https://api.crmapac.acme.com/customers/1264/deliveryLocations/26/", "classification": { "classified_gdpr": true, "classified_internalviews": true, "classified_publicviews": false, "classified_privateviews": true } } }
  • 8. 8Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway from kafka import KafkaProducer from kafka.errors import KafkaError producer = KafkaProducer(bootstrap_servers=['broker1:1234']) # Asynchronous by default future = producer.send('my-topic', b'raw_bytes') # Block for 'synchronous' sends try: record_metadata = future.get(timeout=10) except KafkaError: # Decide what to do if produce request failed... log.exception() pass # Successful result returns assigned partition and offset print (record_metadata.topic) print (record_metadata.partition) print (record_metadata.offset) # produce keyed messages to enable hashed partitioning producer.send('my-topic', key=b'foo', value=b'bar') # encode objects via msgpack producer = KafkaProducer(value_serializer=msgpack.dumps) producer.send('msgpack-topic', {'key': 'value'}) # produce json messages producer = KafkaProducer(value_serializer=lambda m: json.dumps(m).encode('ascii')) producer.send('json-topic', {'key': 'value'}) # produce asynchronously for _ in range(100): producer.send('my-topic', b'msg') def on_send_success(record_metadata): print(record_metadata.topic) print(record_metadata.partition) print(record_metadata.offset) def on_send_error(excp): log.error('I am an errback', exc_info=excp) # handle exception # produce asynchronously with callbacks producer.send('my-topic', b'raw_bytes').add_callback(on_send_success).add_errback(on_send_error) # block until all async messages are sent producer.flush() # configure multiple retries producer = KafkaProducer(retries=5) Microservice Architecture Distribute transactions (option 3)
  • 9. 9Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway Microservice Architecture Distribute transactions (option 3) Microservice Architecture Services can be a subscriber - Easily add new services by subscribing to topics - Kafka topic consumption: - REST API / Native Kafka client - PULL/PUSH - Subscriber defines the required actions on an event - Subscriber calls publisher server API to obtain data - Data should never be stored outside the context of the owning service - or with care and understanding{ "event": { "event_topic": "customerdata", "event_type": "create", "event_application": "CRMAPAC", "event_service": "customers", "event_data_object": "deliveryLocations", "event_data_location": "https://api.crmapac.acme.com/customers/1264/deliveryLocations/26/", "classification": { "classified_gdpr": true, "classified_internalviews": true, "classified_publicviews": false, "classified_privateviews": true } } }
  • 10. 10Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway from kafka import KafkaConsumer # To consume latest messages and auto-commit offsets consumer = KafkaConsumer('my-topic', group_id='my-group', bootstrap_servers=['localhost:9092']) for message in consumer: # message value and key are raw bytes -- decode if necessary! # e.g., for unicode: `message.value.decode('utf-8')` print ("%s:%d:%d: key=%s value=%s" % (message.topic, message.partition, message.offset, message.key, message.value)) # consume earliest available messages, don't commit offsets KafkaConsumer(auto_offset_reset='earliest', enable_auto_commit=False) # consume json messages KafkaConsumer(value_deserializer=lambda m: json.loads(m.decode('ascii'))) # consume msgpack KafkaConsumer(value_deserializer=msgpack.unpackb) # StopIteration if no message after 1sec KafkaConsumer(consumer_timeout_ms=1000) # Subscribe to a regex topic pattern consumer = KafkaConsumer() consumer.subscribe(pattern='^awesome.*') # Use multiple consumers in parallel w/ 0.9 kafka brokers # typically you would run each on a different server / process / CPU consumer1 = KafkaConsumer('my-topic', group_id='my-group', bootstrap_servers='my.server.com') consumer2 = KafkaConsumer('my-topic', group_id='my-group', bootstrap_servers='my.server.com') Microservice Architecture Distribute transactions (option 3)
  • 11. 11Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services API gateway External API ServiceExt consumers Microservice Architecture Inform the world Microservice Architecture Enable the “world” to subscribe as much as possible - Allow all known services to subscribe to topics - Allow unknown parties to subscribe to topic via the external service API - Ensure both known (internal) and unknown (external) parties can only access the data in a secured manner (OAUTH2)
  • 12. 12Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Database (micro)Service(s) Service C Subscribe r Publisher RESTAPI Database (micro)Service(s) Service B Subscribe r Publisher RESTAPI Database (micro)Service(s) Service A Subscribe r Publisher RESTAPI KafkaPub/Sub Application (backend) UI Applications App. Backend Services External API ServiceExt consumers Outbound WebHook Ext/Int subscribers Microservice Architecture Inform the world Microservice Architecture Enable the “world” to subscribe as much as possible - Do provide the option to subscribe to a webhook - Push updates to HTTP(S) endpoints - Prevent aggressive polling - Allows for notification “spreading” - Prevent request storms API gateway
  • 13. 13Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Kafka Pub/Sub External API ServiceOutbound WebHook External Consumers Application 1 (backend) Application 3 (backend) Application 2 (backend) Microservice Architecture Inform everyone Microservice Architecture Simplify the picture - External and internal consumers - Provide APIs, native clients and webhooks - Strive for an event driven architecture
  • 14. 14Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Kafka Pub/Sub External API ServiceOutbound WebHook External Consumers Application 1 (backend) Application 3 (backend) Application 2 (backend) Remember – It is NOT a database More than pub/sub - KSQL Kafka, more than pub/sub Query kafka - Allow developers to query Kafka - Stream analytics - KSQL, a bit more than SQL - Kafka is NOT a database - Keep retention costs in mind
  • 15. 15Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. Kafka Pub/Sub External API ServiceOutbound WebHook External Consumers Application 1 (backend) Application 3 (backend) Application 2 (backend) CREATE STREAM pageviews (viewtime BIGINT, userid VARCHAR, gender VARCHAR, regionid VARCHAR, pageid VARCHAR) WITH (KAFKA_TOPIC='pageviews', VALUE_FORMAT='DELIMITED'); SELECT regionid, COUNT(*) FROM pageviews WINDOW HOPPING (SIZE 30 SECONDS, ADVANCE BY 10 SECONDS) WHERE UCASE(gender)='FEMALE' AND LCASE (regionid) LIKE '%_6' GROUP BY regionid; Remember – It is NOT a database More than pub/sub - KSQL
  • 16. 16Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. DC - A How to deploy Kafka Make it high available Make it High Available It is harder than you think - Single DC cluster - Issues with DC failure - Stretched DC cluster - Issues with split brain and CAP theorem - Cluster per DC - Issues with topic sync Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node A- 0 DC - B Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node B- 0 DC - A Kafka node AKafka node 0 DC - B Kafka node AKafka node 2 DC - A Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node A- 0 DC - B
  • 17. 17Apache Kafka| Johan Louwers | 2018 © 2018 Capgemini. All rights reserved. DC - A How to get Kafka Build versus buy versus consume Kafka provides a high value It comes with a lot of complexity - Build (& deploy) - Invest in a R&D and development - Invest in (virtual HW) - You build it you run it - You know and own everything - Buy - High support costs - Invest in (virtual HW) - Still requires deep knowledge - Could require a maintenance partner - Consume - Pay-per-use PaaS models - Most solutions are in the cloud - Some solutions are private cloud on converged infra Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node A- 0 DC - B Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node B- 0 DC - A Kafka node AKafka node 0 DC - B Kafka node AKafka node 2 DC - A Kafka node A- 3 Kafka node A- 2 Kafka node A- 1 Kafka node A- 0 DC - B