SlideShare a Scribd company logo
13
Most read
14
Most read
22
Most read
Running Kafka as
a Native Binary using GraalVM
Ozan Gunalp, Red Hat
Ozan Gunalp, Red Hat – Quarkus
@ozangunalp
Running Kafka as a
Native Binary using GraalVM
The Problem
Kafka is fast!
3
Can we make it faster?
Reducing broker startup time as much as possible
sub second startup time
Integration Tests with Kafka
KafkaContainer
- Confluent platform image, provided by
org.testcontainers:kafka
- Zookeeper & Kraft-mode
- Not compatible with random
bootstrap.servers port
StrimziKafkaContainer
- Strimzi image, provided by
io.strimzi:strimzi-test-container
- Zookeeper & Kraft-mode
- Can be used with random port
- Cluster support
- Toxiproxy support to simulate network
conditions
4
Both are slow to startup
Kraft with format-storage uses another Java process to create log-dir
Quarkus Dev Services
5
Quarkus
6
Frictionless development
Optimized for Distributed Architectures
Quarkus Developer Joy
7
Dev Mode with live reload, Dev services and Continuous testing
Unified Configuration
Customizable defaults
Quarkus Kube-Native
8
Low memory overhead + Fast startup time + Small container size
=
Increase the deployment density
Observability & Resilience
❤
Quarkus Build-Time
9
kafka-native
10
Kafka broker embedded in a Quarkus application
Default configuration for dev/test purposes
Completely configurable
Compiled to native binary using GraalVM
GraalVM Native Image
Run the same workload on smaller machines on the cloud
11
🚀 🔐 🗜
Smaller size images
– no JVM included
Minimal attack
surface
🍃
Smaller memory
footprint
Faster startup time
– No warmup
native-image compilation
Reachability analysis
Build-time Class Initialization
Heap snapshotting
Metadata for Runtime Reflection, Security Providers 12
Compiling Kafka to native
Netty GraalVM support inherited from Quarkus
Security Providers
Plain, Scram, OAuth, GSSAPI
Substitutions
No Random init on static fields, No thread initialization
Bytecode manipulation
No JMX Support – YammerMetrics, MBean
13
kafka-native Quarkus Dev Service
14
Startup time RSS at startup
quay.io/strimzi-test-container/test-
container
@0.103.0-kafka-3.3.2
~3s 370Mb
vectorized/redpanda
@v22.3.4
~200ms 135Mb
quay.io/ogunalp/kafka-native
@0.2.0-kafka-3.4.0
~120ms 45Mb
quarkus.kafka.devservice.provider=kafka-native
kafka-native-test-container
<!-- https://mvnrepository.com/artifact/com.ozangunalp/kafka-native-test-container -->
<dependency>
<groupId>com.ozangunalp</groupId>
<artifactId>kafka-native-test-container</artifactId>
<version>0.2.0</version>
</dependency>
15
try (var container = new KafkaNativeContainer()) {
container.start();
String bootstrapServers = container.getBootstrapServers();
// create topics
// produce
// consume
}
kafka-native-test-container
16
String clusterId = Uuid.randomUuid().toString();
String quorumVotes = "1@broker1:9094";
var controllerAndBroker = new KafkaNativeContainer();
var brokerOnly = new KafkaNativeContainer();
var common = Map.of(
"SERVER_CLUSTER_ID", clusterId,
"KAFKA_CONTROLLER_QUORUM_VOTERS", quorumVotes);
common.forEach(controllerAndBroker::addEnv);
common.forEach(brokerOnly::addEnv);
controllerAndBroker.withNetworkAliases(broker1);
controllerAndBroker.withNetwork(network);
controllerAndBroker.addEnv("SERVER_HOST", "broker1");
controllerAndBroker.addEnv("KAFKA_BROKER_ID", "1");
brokerOnly.withNetworkAliases(broker2);
brokerOnly.withNetwork(network);
brokerOnly.addEnv("SERVER_HOST", "broker2");
brokerOnly.addEnv("KAFKA_BROKER_ID", "2");
brokerOnly.addEnv("KAFKA_PROCESS_ROLES", "broker");
Startables.deepStart(controllerAndBroker, brokerOnly);
var bs = brokerOnly.getBootstrapServers();
// produce, consume
kafka-native on the Cloud
17
Azure Container Instances
Single-node 1vCPU - 1Gb
~$1.30 per day (us-central)
1rps, 100rps, 1000rps, 5000rps
This is not a benchmark
Caveats
Good for tests and dev
Not production-ready
Classes are linked statically: limited strategy classes
GC performance – only Serial GC in GraalVM CE for now
Lacks managed beans / JMX for observability
Experimental support coming in GraalVM 23
18
What’s Next?
19
Support Zookeeper (Thanks to @kwall)
Support multiple Kafka versions (Thanks to @franvila)
Multi-arch images (ARM support)
Move to Smallrye organization
Experimental JMX Support
https://github.com/ozangunalp/kafka-native
https://quarkus.io
@quarkusio
https://quarkusio.zulipchat.com
https://code.quarkus.io
$>
vs Redpanda
kafka-native IS Kafka upstream code
Redpanda is more than a Kafka-compatible broker
Schema registry, HTTP proxy and UI console
Redpanda behaves slightly differently
Redpanda transactions do not support complete Kafka transactions protocol (?)
21
Strategy config
principal.builder.class, default: DefaultKafkaPrincipalBuilder
replica.selector.class
sasl.client.callback.handler.class
sasl.login.callback.handler.class
sasl.login.class
sasl.server.callback.handler.class
security.providers
ssl.engine.factory.class
alter.config.policy.class.name
authorizer.class.name
client.quota.callback.class
create.cluster.link.policy.class.name
create.topic.policy.class.name
kafka.metrics.reporters
metric.reporters
22

More Related Content

What's hot (20)

PDF
Storage Capacity Management on Multi-tenant Kafka Cluster with Nurettin Omeroglu
HostedbyConfluent
 
PPTX
Hive + Tez: A Performance Deep Dive
DataWorks Summit
 
PDF
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
confluent
 
PPTX
Apache Kafka 0.8 basic training - Verisign
Michael Noll
 
PPTX
Autoscaling Flink with Reactive Mode
Flink Forward
 
PDF
Hive tuning
Michael Zhang
 
PDF
Hardening Kafka Replication
confluent
 
PDF
Container Performance Analysis
Brendan Gregg
 
PPTX
Introduction to Apache Kafka
Jeff Holoman
 
PDF
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark Summit
 
PDF
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
HostedbyConfluent
 
PDF
Presto on Apache Spark: A Tale of Two Computation Engines
Databricks
 
PDF
Java Performance Analysis on Linux with Flame Graphs
Brendan Gregg
 
PPTX
Druid deep dive
Kashif Khan
 
PDF
MLflow Model Serving
Databricks
 
PDF
Deep Dive: Memory Management in Apache Spark
Databricks
 
PPTX
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Flink Forward
 
PDF
Disaster Recovery Plans for Apache Kafka
confluent
 
PDF
Understanding and Improving Code Generation
Databricks
 
PDF
Webinar: Deep Dive on Apache Flink State - Seth Wiesman
Ververica
 
Storage Capacity Management on Multi-tenant Kafka Cluster with Nurettin Omeroglu
HostedbyConfluent
 
Hive + Tez: A Performance Deep Dive
DataWorks Summit
 
Performance Tuning RocksDB for Kafka Streams' State Stores (Dhruba Borthakur,...
confluent
 
Apache Kafka 0.8 basic training - Verisign
Michael Noll
 
Autoscaling Flink with Reactive Mode
Flink Forward
 
Hive tuning
Michael Zhang
 
Hardening Kafka Replication
confluent
 
Container Performance Analysis
Brendan Gregg
 
Introduction to Apache Kafka
Jeff Holoman
 
Spark + Parquet In Depth: Spark Summit East Talk by Emily Curtin and Robbie S...
Spark Summit
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
HostedbyConfluent
 
Presto on Apache Spark: A Tale of Two Computation Engines
Databricks
 
Java Performance Analysis on Linux with Flame Graphs
Brendan Gregg
 
Druid deep dive
Kashif Khan
 
MLflow Model Serving
Databricks
 
Deep Dive: Memory Management in Apache Spark
Databricks
 
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Flink Forward
 
Disaster Recovery Plans for Apache Kafka
confluent
 
Understanding and Improving Code Generation
Databricks
 
Webinar: Deep Dive on Apache Flink State - Seth Wiesman
Ververica
 

Similar to Running Kafka as a Native Binary Using GraalVM with Ozan Günalp (20)

PDF
Quarkus - a shrink ray to your Java Application
CodeOps Technologies LLP
 
PDF
Quarkus Denmark 2019
Max Andersen
 
PDF
ApacheCon EU 2014: Enterprise Development with Apache Karaf
Achim Nierbeck
 
PDF
Dynamic Languages & Web Frameworks in GlassFish
IndicThreads
 
DOCX
Kafk a with zoo keeper setup documentation
Thiyagarajan saminadane
 
PDF
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
PPTX
Big data and hadoop training - Session 5
hkbhadraa
 
PPT
Turning OpenStack Swift into a VM storage platform
wim_provoost
 
PDF
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Claus Ibsen
 
PDF
Java and Containers - Make it Awesome !
Dinakar Guniguntala
 
PDF
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE
 
PDF
Python Kafka Integration: Developers Guide
Inexture Solutions
 
PPTX
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
StreamNative
 
PDF
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
Ovadiah Myrgorod
 
PPTX
Building big data pipelines with Kafka and Kubernetes
Venu Ryali
 
PDF
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
Vadym Kazulkin
 
PPTX
Kafka_authentication_using kerberose.pptx
gamevasani
 
PDF
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Lightbend
 
PDF
Turning OpenStack Swift into a VM storage platform
OpenStack_Online
 
PDF
Production Ready Kafka on Kubernetes (Devandra Tagare, Lyft) Kafka Summit SF ...
confluent
 
Quarkus - a shrink ray to your Java Application
CodeOps Technologies LLP
 
Quarkus Denmark 2019
Max Andersen
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
Achim Nierbeck
 
Dynamic Languages & Web Frameworks in GlassFish
IndicThreads
 
Kafk a with zoo keeper setup documentation
Thiyagarajan saminadane
 
Continuous Delivery: The Next Frontier
Carlos Sanchez
 
Big data and hadoop training - Session 5
hkbhadraa
 
Turning OpenStack Swift into a VM storage platform
wim_provoost
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
Claus Ibsen
 
Java and Containers - Make it Awesome !
Dinakar Guniguntala
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE
 
Python Kafka Integration: Developers Guide
Inexture Solutions
 
Simplifying Migration from Kafka to Pulsar - Pulsar Summit NA 2021
StreamNative
 
Create a Varnish cluster in Kubernetes for Drupal caching - DrupalCon North A...
Ovadiah Myrgorod
 
Building big data pipelines with Kafka and Kubernetes
Venu Ryali
 
AWS Lambda SnapStart: Why, How and What AWS Serverless Meetup New York Boston...
Vadym Kazulkin
 
Kafka_authentication_using kerberose.pptx
gamevasani
 
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Lightbend
 
Turning OpenStack Swift into a VM storage platform
OpenStack_Online
 
Production Ready Kafka on Kubernetes (Devandra Tagare, Lyft) Kafka Summit SF ...
confluent
 
Ad

More from HostedbyConfluent (20)

PDF
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
PDF
Renaming a Kafka Topic | Kafka Summit London
HostedbyConfluent
 
PDF
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 
PDF
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
HostedbyConfluent
 
PDF
Exactly-once Stream Processing with Arroyo and Kafka
HostedbyConfluent
 
PDF
Fish Plays Pokemon | Kafka Summit London
HostedbyConfluent
 
PDF
Tiered Storage 101 | Kafla Summit London
HostedbyConfluent
 
PDF
Building a Self-Service Stream Processing Portal: How And Why
HostedbyConfluent
 
PDF
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
HostedbyConfluent
 
PDF
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
HostedbyConfluent
 
PDF
Navigating Private Network Connectivity Options for Kafka Clusters
HostedbyConfluent
 
PDF
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
HostedbyConfluent
 
PDF
Explaining How Real-Time GenAI Works in a Noisy Pub
HostedbyConfluent
 
PDF
TL;DR Kafka Metrics | Kafka Summit London
HostedbyConfluent
 
PDF
A Window Into Your Kafka Streams Tasks | KSL
HostedbyConfluent
 
PDF
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
HostedbyConfluent
 
PDF
Data Contracts Management: Schema Registry and Beyond
HostedbyConfluent
 
PDF
Code-First Approach: Crafting Efficient Flink Apps
HostedbyConfluent
 
PDF
Debezium vs. the World: An Overview of the CDC Ecosystem
HostedbyConfluent
 
PDF
Beyond Tiered Storage: Serverless Kafka with No Local Disks
HostedbyConfluent
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Renaming a Kafka Topic | Kafka Summit London
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
HostedbyConfluent
 
Exactly-once Stream Processing with Arroyo and Kafka
HostedbyConfluent
 
Fish Plays Pokemon | Kafka Summit London
HostedbyConfluent
 
Tiered Storage 101 | Kafla Summit London
HostedbyConfluent
 
Building a Self-Service Stream Processing Portal: How And Why
HostedbyConfluent
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
HostedbyConfluent
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
HostedbyConfluent
 
Navigating Private Network Connectivity Options for Kafka Clusters
HostedbyConfluent
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
HostedbyConfluent
 
Explaining How Real-Time GenAI Works in a Noisy Pub
HostedbyConfluent
 
TL;DR Kafka Metrics | Kafka Summit London
HostedbyConfluent
 
A Window Into Your Kafka Streams Tasks | KSL
HostedbyConfluent
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
HostedbyConfluent
 
Data Contracts Management: Schema Registry and Beyond
HostedbyConfluent
 
Code-First Approach: Crafting Efficient Flink Apps
HostedbyConfluent
 
Debezium vs. the World: An Overview of the CDC Ecosystem
HostedbyConfluent
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
HostedbyConfluent
 
Ad

Recently uploaded (20)

PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Digital Circuits, important subject in CS
contactparinay1
 

Running Kafka as a Native Binary Using GraalVM with Ozan Günalp