SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
Deploying Kafka on DC/OS
Kaufman Ng, Solutions Architect, Confluent
Who is this for?
• How to effectively deploy Kafka on
DC/OS?
• Things to watch out for
• Target audience:
– Administrators
– Architects
Agenda
• About Me
• About Confluent
• What is Apache Kafka?
• Why Kafka on DC/OS?
• Gotchas
• Questions
About Me
• Solutions Architect, Confluent
• Previously Senior Solutions Architect, Cloudera
• Contributor to Kafka, Parquet
• kaufman@confluent.io
• Twitter: @kaufmanng
About Confluent
• Founded	by	the	creators	of	Apache	Kafka
• Company	founded	September	2014
• Technology	developed	while	at	LinkedIn
• About	70%	of	active	Kafka	committers
Confluent Platform and Apache Kafka
Apache	Kafka
• Open	source
• Publish	and	Subscribe
• Processing
• Storage
Confluent	Open	Source
• Open	source
• Data	management
• Connectors
• Clients
Confluent	Enterprise
• Administration	features
• Operations	features
• Monitoring	features
• 30-day	free	evaluation
What is Apache Kafka?
• A distributed streaming platform
• Pub-sub paradigm similar to message
queue
• Fault-tolerant
• Allows stream processing of events as
they occur
What	does	Kafka do?
Producers
Consumers
Kafka Connect
Kafka Connect
Topic
Your	interfaces	to	the	world
Connected	to	your	systems	in	real	time
Apache Kafka 101
What is Apache Kafka?
Before: Many Ad Hoc Pipelines
Search Security
Fraud Detection Application
User	Tracking Operational	Logs Operational	Metrics
Hadoop Search Monitoring
Data	
Warehouse
Espresso Cassandra Oracle
After: Central Hub with Kafka
Search Security
Fraud Detection Application
User	Tracking Operational	Logs Operational	MetricsEspresso Cassandra Oracle
Hadoop Log	Search Monitoring
Data	
Warehouse
Kafka
What’s in a Kafka Cluster?
• A typical Kafka cluster consists of these:
– Broker
– Zookeeper
– Kafka Connect
– Kafka Streams
• Confluent Platform add-ons:
– Schema Registry
– REST Proxy
– And others (Replicator, Auto Data Balancer, and others)
Why Kafka on DC/OS?
• Ease of management
• Container support
• Stateful and stateless services
• Service discovery and routing
Kafka Cluster Services
Kafka Services are Stateful
How do you manage all these?
• A cluster consists of a mix of stateful and
stateless services
• Plus other external systems
• Service discovery, load balancing
concerns
• DC/OS comes to the rescue
Where to place these services?
• Brokers should NOT be co-located
• Broker nodes should have dedicated disks
• Same for Zookeeper servers
• Brokers should not be co-located with
Zookeepers
• And which containerizer should I use?
Mesos, docker
DC/OS benefits for Kafka
• Easy to configure cluster size
• Node and placement constraints
• Handling of stateful services like brokers
How many brokers
• Recommended: 3 brokers to start
• At least 1-2 GB memory each
• A few CPU cores is ok (~4)
• Don’t place them together!
• In Marathon’s config.json:
"placement_constraint": "hostname:MAX_PER:1"
• Don’t change this: "PLACEMENT_STRATEGY": "NODE”
Service config sample
"service": {
"name": "confluent-kafka",
"mesos_api_version": "V0",
"user": "nobody",
"placement_constraint": "hostname:MAX_PER:1",
"deploy_strategy": "serial",
"virtual_network_enabled": false,
"virtual_network_name": "dcos",
"log_level": "INFO"
}
Broker config sample
"brokers": {
"cpus": 1,
"mem": 4096,
"disk": 5000,
"disk_type": ”MOUNT",
"disk_path": "kafka-broker-data",
"count": 3,
"port": 0,
"heap": {
"size": 2048
}
}
Kafka Storage Volumes
• Messages are flushed to disks
• HDDs are better than SSDs
• RAID is better than JBOD
• MOUNT volumes better than ROOT
Pinning the brokers
• You could tie brokers to nodes with bigger
storage by using placement constraints
• "placement_constraint": ”10.0.10.1|
10.0.10.2| 10.0.10.3"
What about Zookeeper?
• DC/OS comes with Zookeeper, should I
use it?
• Depends on how many services need ZK
Gotchas
• Restart brokers with DC/OS UI vs CLI
• Kafka Streams
• Failures
Kafka Broker Restarts
• Upon restart broker has to catch up with
others (because of replication, etc.)
• No rolling restarts in DC/OS UI
• Better to do rolling restart via CLI:
• dcos broker restart <broker_id>
• Check broker logs!
Kafka Streams with fault-tolerance
State stores
Kafka Streams with fault-tolerance
State stores
Kafka Streams with fault-tolerance
State stores
Kafka Streams with states
• Each Kafka Streams application instance has
its own embedded state store
• State stores have to be synced/assigned
upon restarts, that could take time
• When containers restart, they will be
spawned on different slave node, hence
empty state store -> longer startup time
Running other Kafka Components
• They are stateless and lighter on
resources
• Kafka Connect workers
Failures
• DC/OS will restart services when they fail
• But admins should look into why
• Use alerting tools, e.g. Nagios
Useful Links
• Service docs:
– Apache Kafka: https://docs.mesosphere.com/service-
docs/kafka/
– Confluent Platform:
https://docs.mesosphere.com/service-docs/confluent-
kafka/v2.0.0.1-3.3.0e/
• package source:
https://github.com/mesosphere/universe/tree/versi
on-3.x/repo/packages/C/confluent-kafka/
Other useful CLI tools
• Kafka-client docker image
https://hub.docker.com/r/mesosphere/kafk
a-client/
• Confluent Platform
Questions?

Más contenido relacionado

La actualidad más candente

Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Knoldus Inc.
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka IntroductionAmita Mirajkar
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaShiao-An Yuan
 
Exactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsExactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsGuozhang Wang
 
Kafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformKafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformJean-Paul Azar
 
Schema registry
Schema registrySchema registry
Schema registryWhiteklay
 
Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Timothy Spann
 
Confluent building a real-time streaming platform using kafka streams and k...
Confluent   building a real-time streaming platform using kafka streams and k...Confluent   building a real-time streaming platform using kafka streams and k...
Confluent building a real-time streaming platform using kafka streams and k...Thomas Alex
 
Kafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around KafkaKafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around KafkaGuido Schmutz
 
Introduction to Kafka
Introduction to KafkaIntroduction to Kafka
Introduction to KafkaAkash Vacher
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overviewconfluent
 
Building Event-Driven Systems with Apache Kafka
Building Event-Driven Systems with Apache KafkaBuilding Event-Driven Systems with Apache Kafka
Building Event-Driven Systems with Apache KafkaBrian Ritchie
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsSlim Baltagi
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...HostedbyConfluent
 
Fundamentals and Architecture of Apache Kafka
Fundamentals and Architecture of Apache KafkaFundamentals and Architecture of Apache Kafka
Fundamentals and Architecture of Apache KafkaAngelo Cesaro
 
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 - MadridPaolo Castagna
 

La actualidad más candente (20)

Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
 
Apache Kafka Introduction
Apache Kafka IntroductionApache Kafka Introduction
Apache Kafka Introduction
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Exactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka StreamsExactly-once Stream Processing with Kafka Streams
Exactly-once Stream Processing with Kafka Streams
 
Kafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platformKafka Tutorial - basics of the Kafka streaming platform
Kafka Tutorial - basics of the Kafka streaming platform
 
Schema registry
Schema registrySchema registry
Schema registry
 
Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)
 
Kafka internals
Kafka internalsKafka internals
Kafka internals
 
Confluent building a real-time streaming platform using kafka streams and k...
Confluent   building a real-time streaming platform using kafka streams and k...Confluent   building a real-time streaming platform using kafka streams and k...
Confluent building a real-time streaming platform using kafka streams and k...
 
Kafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around KafkaKafka Connect & Streams - the ecosystem around Kafka
Kafka Connect & Streams - the ecosystem around Kafka
 
Introduction to Kafka
Introduction to KafkaIntroduction to Kafka
Introduction to Kafka
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
 
KSQL Intro
KSQL IntroKSQL Intro
KSQL Intro
 
Building Event-Driven Systems with Apache Kafka
Building Event-Driven Systems with Apache KafkaBuilding Event-Driven Systems with Apache Kafka
Building Event-Driven Systems with Apache Kafka
 
Kafka Streams for Java enthusiasts
Kafka Streams for Java enthusiastsKafka Streams for Java enthusiasts
Kafka Streams for Java enthusiasts
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
 
Fundamentals and Architecture of Apache Kafka
Fundamentals and Architecture of Apache KafkaFundamentals and Architecture of Apache Kafka
Fundamentals and Architecture of Apache Kafka
 
kafka for db as postgres
kafka for db as postgreskafka for db as postgres
kafka for db as postgres
 
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
 

Similar a Deploying Kafka on DC/OS

Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSLightbend
 
Consensus in Apache Kafka: From Theory to Production.pdf
Consensus in Apache Kafka: From Theory to Production.pdfConsensus in Apache Kafka: From Theory to Production.pdf
Consensus in Apache Kafka: From Theory to Production.pdfGuozhang Wang
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à Québec
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructureVille Seppänen
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsRyan Green
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?PROIDEA
 
Flying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsFlying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsJacek Bukowski
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...Tony Erwin
 
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)Lucas Jellema
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Huy Vo
 
Implementing FaaS on Kubernetes using Kubeless
Implementing FaaS on Kubernetes using KubelessImplementing FaaS on Kubernetes using Kubeless
Implementing FaaS on Kubernetes using KubelessAhmed Misbah
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13Amrita Prasad
 
A Practical Guide To End-to-End Tracing In Event Driven Architectures
A Practical Guide To End-to-End Tracing In Event Driven ArchitecturesA Practical Guide To End-to-End Tracing In Event Driven Architectures
A Practical Guide To End-to-End Tracing In Event Driven ArchitecturesHostedbyConfluent
 
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY StyleAthens Big Data
 

Similar a Deploying Kafka on DC/OS (20)

Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OSPutting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
Putting Kafka In Jail – Best Practices To Run Kafka On Kubernetes & DC/OS
 
Microservices deck
Microservices deckMicroservices deck
Microservices deck
 
Kafka Explainaton
Kafka ExplainatonKafka Explainaton
Kafka Explainaton
 
Jug - ecosystem
Jug -  ecosystemJug -  ecosystem
Jug - ecosystem
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 
Consensus in Apache Kafka: From Theory to Production.pdf
Consensus in Apache Kafka: From Theory to Production.pdfConsensus in Apache Kafka: From Theory to Production.pdf
Consensus in Apache Kafka: From Theory to Production.pdf
 
Chti jug - 2018-06-26
Chti jug - 2018-06-26Chti jug - 2018-06-26
Chti jug - 2018-06-26
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Journey towards serverless infrastructure
Journey towards serverless infrastructureJourney towards serverless infrastructure
Journey towards serverless infrastructure
 
NDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design Patterns
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
 
Flying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native ApplicationsFlying to clouds - can it be easy? Cloud Native Applications
Flying to clouds - can it be easy? Cloud Native Applications
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
Migration of an Enterprise UI Microservice System from Cloud Foundry to Kuber...
 
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
Event Bus as Backbone for Decoupled Microservice Choreography (JFall 2017)
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Implementing FaaS on Kubernetes using Kubeless
Implementing FaaS on Kubernetes using KubelessImplementing FaaS on Kubernetes using Kubeless
Implementing FaaS on Kubernetes using Kubeless
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
A Practical Guide To End-to-End Tracing In Event Driven Architectures
A Practical Guide To End-to-End Tracing In Event Driven ArchitecturesA Practical Guide To End-to-End Tracing In Event Driven Architectures
A Practical Guide To End-to-End Tracing In Event Driven Architectures
 
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
8th Athens Big Data Meetup - 1st Talk - Riding The Streaming Wave DIY Style
 

Último

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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 

Último (20)

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
 
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)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 

Deploying Kafka on DC/OS

  • 1. Deploying Kafka on DC/OS Kaufman Ng, Solutions Architect, Confluent
  • 2. Who is this for? • How to effectively deploy Kafka on DC/OS? • Things to watch out for • Target audience: – Administrators – Architects
  • 3. Agenda • About Me • About Confluent • What is Apache Kafka? • Why Kafka on DC/OS? • Gotchas • Questions
  • 4. About Me • Solutions Architect, Confluent • Previously Senior Solutions Architect, Cloudera • Contributor to Kafka, Parquet • kaufman@confluent.io • Twitter: @kaufmanng
  • 5. About Confluent • Founded by the creators of Apache Kafka • Company founded September 2014 • Technology developed while at LinkedIn • About 70% of active Kafka committers
  • 6. Confluent Platform and Apache Kafka Apache Kafka • Open source • Publish and Subscribe • Processing • Storage Confluent Open Source • Open source • Data management • Connectors • Clients Confluent Enterprise • Administration features • Operations features • Monitoring features • 30-day free evaluation
  • 7. What is Apache Kafka? • A distributed streaming platform • Pub-sub paradigm similar to message queue • Fault-tolerant • Allows stream processing of events as they occur
  • 8. What does Kafka do? Producers Consumers Kafka Connect Kafka Connect Topic Your interfaces to the world Connected to your systems in real time Apache Kafka 101
  • 9. What is Apache Kafka?
  • 10. Before: Many Ad Hoc Pipelines Search Security Fraud Detection Application User Tracking Operational Logs Operational Metrics Hadoop Search Monitoring Data Warehouse Espresso Cassandra Oracle
  • 11. After: Central Hub with Kafka Search Security Fraud Detection Application User Tracking Operational Logs Operational MetricsEspresso Cassandra Oracle Hadoop Log Search Monitoring Data Warehouse Kafka
  • 12. What’s in a Kafka Cluster? • A typical Kafka cluster consists of these: – Broker – Zookeeper – Kafka Connect – Kafka Streams • Confluent Platform add-ons: – Schema Registry – REST Proxy – And others (Replicator, Auto Data Balancer, and others)
  • 13. Why Kafka on DC/OS? • Ease of management • Container support • Stateful and stateless services • Service discovery and routing
  • 15. Kafka Services are Stateful
  • 16. How do you manage all these? • A cluster consists of a mix of stateful and stateless services • Plus other external systems • Service discovery, load balancing concerns • DC/OS comes to the rescue
  • 17. Where to place these services? • Brokers should NOT be co-located • Broker nodes should have dedicated disks • Same for Zookeeper servers • Brokers should not be co-located with Zookeepers • And which containerizer should I use? Mesos, docker
  • 18. DC/OS benefits for Kafka • Easy to configure cluster size • Node and placement constraints • Handling of stateful services like brokers
  • 19. How many brokers • Recommended: 3 brokers to start • At least 1-2 GB memory each • A few CPU cores is ok (~4) • Don’t place them together! • In Marathon’s config.json: "placement_constraint": "hostname:MAX_PER:1" • Don’t change this: "PLACEMENT_STRATEGY": "NODE”
  • 20. Service config sample "service": { "name": "confluent-kafka", "mesos_api_version": "V0", "user": "nobody", "placement_constraint": "hostname:MAX_PER:1", "deploy_strategy": "serial", "virtual_network_enabled": false, "virtual_network_name": "dcos", "log_level": "INFO" }
  • 21. Broker config sample "brokers": { "cpus": 1, "mem": 4096, "disk": 5000, "disk_type": ”MOUNT", "disk_path": "kafka-broker-data", "count": 3, "port": 0, "heap": { "size": 2048 } }
  • 22. Kafka Storage Volumes • Messages are flushed to disks • HDDs are better than SSDs • RAID is better than JBOD • MOUNT volumes better than ROOT
  • 23. Pinning the brokers • You could tie brokers to nodes with bigger storage by using placement constraints • "placement_constraint": ”10.0.10.1| 10.0.10.2| 10.0.10.3"
  • 24. What about Zookeeper? • DC/OS comes with Zookeeper, should I use it? • Depends on how many services need ZK
  • 25. Gotchas • Restart brokers with DC/OS UI vs CLI • Kafka Streams • Failures
  • 26. Kafka Broker Restarts • Upon restart broker has to catch up with others (because of replication, etc.) • No rolling restarts in DC/OS UI • Better to do rolling restart via CLI: • dcos broker restart <broker_id> • Check broker logs!
  • 27. Kafka Streams with fault-tolerance State stores
  • 28. Kafka Streams with fault-tolerance State stores
  • 29. Kafka Streams with fault-tolerance State stores
  • 30. Kafka Streams with states • Each Kafka Streams application instance has its own embedded state store • State stores have to be synced/assigned upon restarts, that could take time • When containers restart, they will be spawned on different slave node, hence empty state store -> longer startup time
  • 31. Running other Kafka Components • They are stateless and lighter on resources • Kafka Connect workers
  • 32. Failures • DC/OS will restart services when they fail • But admins should look into why • Use alerting tools, e.g. Nagios
  • 33. Useful Links • Service docs: – Apache Kafka: https://docs.mesosphere.com/service- docs/kafka/ – Confluent Platform: https://docs.mesosphere.com/service-docs/confluent- kafka/v2.0.0.1-3.3.0e/ • package source: https://github.com/mesosphere/universe/tree/versi on-3.x/repo/packages/C/confluent-kafka/
  • 34. Other useful CLI tools • Kafka-client docker image https://hub.docker.com/r/mesosphere/kafk a-client/ • Confluent Platform