SlideShare a Scribd company logo
1 of 45
Download to read offline
Achieving a 50% Reduction in
Cross-AZ Network Costs
from Kafka
Uday Sagar Shiramshetty
SignalFx
About Me:
● 4+ years of experience in
Monitoring and Distributed
Systems
● Site Reliability Engineer
● Distributed Systems Engineer
● Currently, building an In-memory
database to be able to search
metadata on billions of time
series.
About SignalFx:
● Real-Time Cloud Monitoring
Platform for Infrastructure,
Microservices and Applications
● 20 Kafka clusters in production
● 400 billion messages per day on
the largest cluster
● Officially part of Splunk from
Today
4
SignalFx is the Only Real-Time Observability Platform
Smart Gateway™
Metricization
Metadata Extraction
TraceStore
COLLECTION PRE-PROCESSING STREAMING RETENTION ANALYTICS CAPABILITIES
SMART AGENT
SFx Quantizer™
DYNAMIC
LAG ADJUSTMENT
ROLL-UPS
1sec
1min
5min
1hr
+>
Metadata Router
Time Series Router
MetaStore
MetricsStore
ROOT CAUSE
ANALYSIS
DEBUGGING
SERVICE MAPPING
Distributed Traces
Auto-Instrumentation
Code Instrumentation
Telemetry Adapter
Metrics
Function Wrappers
Cloud API Integrations
Custom Metrics
HIGH-RES
VISUALIZATION
AUTOMATION
ALERTING
SIGNALFX PATENTED STREAMING ARCHITECTURE
5
Goal and Agenda
Goal: Reduce data transfer across availability zones to lower network costs.
Agenda:
• Motivation: AWS network pricing model
• Brief overview of AZ awareness and compression
• Deep dive on AZ awareness
• Benefits of Kafka Message Compression
• Charts showing our benefits
6
Motivation: AWS Network Pricing Model
Cross AZ Data Price ($)
1 GB 0.02
1 TB 20
1 PB 20,000
7
• Kafka brokers are grouped in Racks
• Racks provide fault tolerance and each rack may be in a different physical
location or has its own power source
• In AWS, racks are generally mapped to Availability Zones
• This talk uses the terms Rack and Availability Zone interchangeably
A Brief Overview
9Confidential & Proprietary ©SignalFx 2019
10Confidential & Proprietary ©SignalFx 2019
11Confidential & Proprietary ©SignalFx 2019
12Confidential & Proprietary ©SignalFx 2019
13Confidential & Proprietary ©SignalFx 2019
14Confidential & Proprietary ©SignalFx 2019
15
Simple Kafka
Setup
Kafka Setup
+ AZ aware
routing
Kafka Setup
+Compression*
Kafka Setup
+ AZ aware
routing
+Compression*
Kafka Setup
+ AZ aware
routing
+ Compression**
AZ hops 4 2 4 2 2
Price 8U 4U 4U 3.2U 2U
Deep Dive on
Kafka AZ
Awareness
17
We need our producers and consumers to talk to leader brokers in the same AZ.
18
• Kafka Producer needs to be aware of leader partitions in an AZ
• Kafka client library can help us find the locations of leader partitions in an AZ
• Then, the producer will have to produce messages onto those
leader partitions
19
On producer initialization:
String myRack = System.getProperty("KAFKA_PRODUCER_RACK", "defaultRack");
TopicDescription topicDescription = getTopicDescription(topicName);
List<Integer> desiredPartitions = topicDescription.partitions().stream()
.filter(p -> myRack.equals(getLeaderRack(p))
.map(TopicPartitionInfo::partition)
.collect(Collectors.toList());
…
To send a message:
int partition = getPartition(message, desiredPartitions);
ProducerRecord record = new ProducerRecord<>(topicName, partition, null, message);
producer.send(record);
20
There are few things to consider before finalizing on desired partitions to produce
messages.
1. What if partitions are not spread across brokers properly?
2. What if we don’t have any leader partitions in the same rack?
3. What happens to an already initialized state of desired partitions if replica
assignment is updated?
For 1 and 2, we default to spraying messages across all partitions. Then, we balance
partitions assignment as an operational task.
For 3, we just need a callback hook to be able to re-create desired partitions state
after an update to assignment.
21
Kafka Cluster Group Coordinator
22
Kafka Consumer Rebalance
23
PartitionAssignor
Kafka Java client library has an interface called PartitionAssignor, that allows us to
define our own custom partition assignment strategy.
public interface PartitionAssignor {
/**
* Return a serializable object representing the local
* member’s subscription.
*/
Subscription subscription(Set<String> topics);
/**
* Perform the group assignment given the member subscriptions
* and current cluster metadata.
*/
Map<String, Assignment> assign(Cluster metadata, Map<String, Subscription> subscriptions);
...
}
24
PartitionAssignor
Partitions can be assigned to consumers in the group based on different implementations of
PartitionAssignor. For example:
1. RangeAssignor
2. RoundRobinAssignor
3. StickyAssignor
4. RackAwareAssignor *
RangeAssignor is the default for a Kafka consumer.
RackAwareAssignor is our implementation to get an AZ aware consumer assignment.
25
RangeAssignor
An introductory example:
Two consumers C0 and C1 and two topics t0 and t1 with 3 partitions each.
Topic t0: t0p0, t0p1, t0p2
Topic t1: t1p0, t1p1, t1p2
Assignment will be:
C0: [t0p0, t0p1, t1p0, t1p1]
C1: [t0p2, t1p2]
26
RackAwareAssignor
Two consumers C0 (R1) and C1 (R2), two topics t0 and t1 with 3 partitions each.
Topic t0: t0p0 (R1), t0p1 (R2), t0p2 (R1)
Topic t1: t1p0 (R1), t1p1 (R2), t1p2 (R2)
R1 and R2 are racks where the leader partitions are located.
Assignment will be:
C0: [t0p0, t0p2, t1p0]
C1: [t0p1, t1p1, t1p2]
27
RackAwareAssignor
RackAwareAssignor.class is supplied as partition.assignment.strategy config
value during consumer initialization.
partition.assignment.strategy:[RackAwareAssignor.class,
RangeAssignor.class]
Most preferred PartitionAssignor suggested by all consumer group members is used for
assignment.
To update the strategy, you will have to include old, new strategy in the config value with
new strategy followed by old. Then, after re-initializing majority of consumers in the group,
your new strategy will be used.
28
RackAwareAssignor
Step 1:
maxNumOfPartitions = Math
.ceil(topicPartitionsCount * 1.0 / totalConsumersCount);
Step 2:
Assign partitions to consumers from same rack
while ensuring that any consumer has only up to
maxNumOfPartitions partitions assigned.
Step 3:
Assign the remaining partitions to consumers with
fewer assignments.
29
RackAwareAssignor
private static final String RACK_KEY_NAME = "consumer_rack";
private static final String CONSUMER_RACK = System.getProperty("KAFKA_CONSUMER_RACK", "default");
private static final Schema CONSUMER_RACK_SCHEMA = new Schema(new Field(RACK_KEY_NAME, Type.STRING));
@Override
public Subscription subscription(Set<String> topics) {
ByteBuffer userData = serializeUserData(CONSUMER_RACK);
return new Subscription(new ArrayList<>(topics), userData);
}
private static ByteBuffer serializeUserData(String rack) {
Struct struct = new Struct(CONSUMER_RACK_SCHEMA);
struct.set(RACK_KEY_NAME, rack);
ByteBuffer buffer = ByteBuffer.allocate(CONSUMER_RACK_SCHEMA.sizeOf(struct));
CONSUMER_RACK_SCHEMA.write(buffer, struct);
buffer.flip();
return buffer;
}
private static String deserializeUserData(ByteBuffer buffer) {
Struct struct = CONSUMER_RACK_SCHEMA.read(buffer);
return struct.getString(RACK_KEY_NAME);
}
Kafka AZ
Awareness on
Other Complicated
Use Cases
31
Aggregations / Sequential Processing
Related messages need to be enqueued on same partitions.
32
Fixed Consumer Assignment
Related messages need to be processed on single consumer instance, without group
membership changes (even when a consumer goes down).
Each consumer instance owns a set of statically assigned tokens and those has to be
mapped to their partitions.
33
Tokens - Partitions Assignment
Partition assignment should be based on large ranges of tokens assigned to racks,
not in any random order.
For ex: with 6 partitions, 6 tokens, 3 brokers (broker id: 0, 1, 2 - 1 in each rack), the
assignment could be:
34
Tokens - Partitions Assignment
Problem: When broker 0 goes down, broker 1 gets all the load
1
1
1
1
35
Tokens - Partitions Assignment
Better Assignment would like:
36
Tokens - Partitions Assignment
When broker 0 goes down, broker 1 and 2 share the load
37
Kafka as Backup Store
Consumer groups in all racks need to consume entire data on all partitions.
38
Fission Reaction
When one update triggers multiple updates, AZ awareness will cause scalability
troubles.
Kafka Message
Compression
40
Kafka Message Compression
• Kafka supports end-to-end compression
• Data is compressed by the Kafka producer client
• Data is written in compressed format on Kafka brokers, leading to savings on disk
usage
• Data is decompressed by Kafka consumer client
41
Kafka Message Compression
• Enabling compression is as simple as setting the config compression.type on Kafka
producer client
• Compression uses extra CPU and memory on producer/consumer
• Snappy compression type worked best for us
42
Benefits from AZ Awareness
45% decrease in Data Transfer - Regional Bytes
43
Benefits from AZ Awareness
Decrease in average end-to-end
latency over last day
44
Benefits from Message Compression
Decrease in average bytes/message over
last day
Thank You!
Any Questions?

More Related Content

What's hot

Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guideRyan Blue
 
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander ZaitsevMigration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander ZaitsevAltinity Ltd
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOAltinity Ltd
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOAltinity Ltd
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explainedconfluent
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentFlink Forward
 
Better than you think: Handling JSON data in ClickHouse
Better than you think: Handling JSON data in ClickHouseBetter than you think: Handling JSON data in ClickHouse
Better than you think: Handling JSON data in ClickHouseAltinity Ltd
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationDatabricks
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAltinity Ltd
 
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...Mydbops
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOAltinity Ltd
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producerconfluent
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouseAltinity Ltd
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfJesmar Cannao'
 
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIData Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIAltinity Ltd
 
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...Databricks
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseAltinity Ltd
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...Altinity Ltd
 

What's hot (20)

Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guide
 
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander ZaitsevMigration to ClickHouse. Practical guide, by Alexander Zaitsev
Migration to ClickHouse. Practical guide, by Alexander Zaitsev
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEOTricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
Tricks every ClickHouse designer should know, by Robert Hodges, Altinity CEO
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production Deployment
 
Better than you think: Handling JSON data in ClickHouse
Better than you think: Handling JSON data in ClickHouseBetter than you think: Handling JSON data in ClickHouse
Better than you think: Handling JSON data in ClickHouse
 
Apache Spark Core – Practical Optimization
Apache Spark Core – Practical OptimizationApache Spark Core – Practical Optimization
Apache Spark Core – Practical Optimization
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
 
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
PostgreSQL 15 and its Major Features -(Aakash M - Mydbops) - Mydbops Opensour...
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
 
Common issues with Apache Kafka® Producer
Common issues with Apache Kafka® ProducerCommon issues with Apache Kafka® Producer
Common issues with Apache Kafka® Producer
 
Your first ClickHouse data warehouse
Your first ClickHouse data warehouseYour first ClickHouse data warehouse
Your first ClickHouse data warehouse
 
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdfProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
ProxySQL and the Tricks Up Its Sleeve - Percona Live 2022.pdf
 
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UIData Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
Data Warehouses in Kubernetes Visualized: the ClickHouse Kubernetes Operator UI
 
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
Designing ETL Pipelines with Structured Streaming and Delta Lake—How to Archi...
 
High Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouseHigh Performance, High Reliability Data Loading on ClickHouse
High Performance, High Reliability Data Loading on ClickHouse
 
ClickHouse Keeper
ClickHouse KeeperClickHouse Keeper
ClickHouse Keeper
 
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...
 

Similar to Achieving a 50% Reduction in Cross-AZ Network Costs from Kafka (Uday Sagar Siramshetty, SignalFX)

Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...HostedbyConfluent
 
Apache Pulsar Overview
Apache Pulsar OverviewApache Pulsar Overview
Apache Pulsar OverviewStreamlio
 
Apache Kafka Women Who Code Meetup
Apache Kafka Women Who Code MeetupApache Kafka Women Who Code Meetup
Apache Kafka Women Who Code MeetupSnehal Nagmote
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...DataWorks Summit/Hadoop Summit
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaTimothy Spann
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 
Getting Started with Kafka on k8s
Getting Started with Kafka on k8sGetting Started with Kafka on k8s
Getting Started with Kafka on k8sVMware Tanzu
 
Concepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with KafkaConcepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with KafkaQAware GmbH
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningGuido Schmutz
 
Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaJoe Stein
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at ScaleSean Zhong
 
Ingestion and Dimensions Compute and Enrich using Apache Apex
Ingestion and Dimensions Compute and Enrich using Apache ApexIngestion and Dimensions Compute and Enrich using Apache Apex
Ingestion and Dimensions Compute and Enrich using Apache ApexApache Apex
 
SignalFx Kafka Consumer Optimization
SignalFx Kafka Consumer OptimizationSignalFx Kafka Consumer Optimization
SignalFx Kafka Consumer OptimizationSignalFx
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetesconfluent
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafkaconfluent
 
DRP for Big Data - Stream Processing Architectures
DRP for Big Data - Stream Processing ArchitecturesDRP for Big Data - Stream Processing Architectures
DRP for Big Data - Stream Processing ArchitecturesMohamed Mehdi Ben Aissa
 
Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Monal Daxini
 
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database clusterGrokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database clusterGrokking VN
 

Similar to Achieving a 50% Reduction in Cross-AZ Network Costs from Kafka (Uday Sagar Siramshetty, SignalFX) (20)

Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
Building a Scalable Real-Time Fleet Management IoT Data Tracker with Kafka St...
 
Apache Pulsar Overview
Apache Pulsar OverviewApache Pulsar Overview
Apache Pulsar Overview
 
Apache Kafka Women Who Code Meetup
Apache Kafka Women Who Code MeetupApache Kafka Women Who Code Meetup
Apache Kafka Women Who Code Meetup
 
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
End to End Processing of 3.7 Million Telemetry Events per Second using Lambda...
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with Java
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 
Getting Started with Kafka on k8s
Getting Started with Kafka on k8sGetting Started with Kafka on k8s
Getting Started with Kafka on k8s
 
Concepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with KafkaConcepts and Patterns for Streaming Services with Kafka
Concepts and Patterns for Streaming Services with Kafka
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
 
Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
 
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
Strata Singapore: GearpumpReal time DAG-Processing with Akka at ScaleStrata Singapore: GearpumpReal time DAG-Processing with Akka at Scale
Strata Singapore: Gearpump Real time DAG-Processing with Akka at Scale
 
Ingestion and Dimensions Compute and Enrich using Apache Apex
Ingestion and Dimensions Compute and Enrich using Apache ApexIngestion and Dimensions Compute and Enrich using Apache Apex
Ingestion and Dimensions Compute and Enrich using Apache Apex
 
Polyraptor
PolyraptorPolyraptor
Polyraptor
 
SignalFx Kafka Consumer Optimization
SignalFx Kafka Consumer OptimizationSignalFx Kafka Consumer Optimization
SignalFx Kafka Consumer Optimization
 
Deploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and KubernetesDeploying Kafka Streams Applications with Docker and Kubernetes
Deploying Kafka Streams Applications with Docker and Kubernetes
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafka
 
DRP for Big Data - Stream Processing Architectures
DRP for Big Data - Stream Processing ArchitecturesDRP for Big Data - Stream Processing Architectures
DRP for Big Data - Stream Processing Architectures
 
Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014
 
Brkdct 3101
Brkdct 3101Brkdct 3101
Brkdct 3101
 
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database clusterGrokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
 

More from confluent

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flinkconfluent
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flinkconfluent
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...confluent
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluentconfluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkconfluent
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloudconfluent
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Diveconfluent
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluentconfluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Meshconfluent
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservicesconfluent
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3confluent
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernizationconfluent
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataconfluent
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2confluent
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023confluent
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesisconfluent
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023confluent
 
The Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data StreamsThe Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data Streamsconfluent
 

More from confluent (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 
The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023The Future of Application Development - API Days - Melbourne 2023
The Future of Application Development - API Days - Melbourne 2023
 
The Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data StreamsThe Playful Bond Between REST And Data Streams
The Playful Bond Between REST And Data Streams
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
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
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Achieving a 50% Reduction in Cross-AZ Network Costs from Kafka (Uday Sagar Siramshetty, SignalFX)

  • 1. Achieving a 50% Reduction in Cross-AZ Network Costs from Kafka Uday Sagar Shiramshetty SignalFx
  • 2. About Me: ● 4+ years of experience in Monitoring and Distributed Systems ● Site Reliability Engineer ● Distributed Systems Engineer ● Currently, building an In-memory database to be able to search metadata on billions of time series.
  • 3. About SignalFx: ● Real-Time Cloud Monitoring Platform for Infrastructure, Microservices and Applications ● 20 Kafka clusters in production ● 400 billion messages per day on the largest cluster ● Officially part of Splunk from Today
  • 4. 4 SignalFx is the Only Real-Time Observability Platform Smart Gateway™ Metricization Metadata Extraction TraceStore COLLECTION PRE-PROCESSING STREAMING RETENTION ANALYTICS CAPABILITIES SMART AGENT SFx Quantizer™ DYNAMIC LAG ADJUSTMENT ROLL-UPS 1sec 1min 5min 1hr +> Metadata Router Time Series Router MetaStore MetricsStore ROOT CAUSE ANALYSIS DEBUGGING SERVICE MAPPING Distributed Traces Auto-Instrumentation Code Instrumentation Telemetry Adapter Metrics Function Wrappers Cloud API Integrations Custom Metrics HIGH-RES VISUALIZATION AUTOMATION ALERTING SIGNALFX PATENTED STREAMING ARCHITECTURE
  • 5. 5 Goal and Agenda Goal: Reduce data transfer across availability zones to lower network costs. Agenda: • Motivation: AWS network pricing model • Brief overview of AZ awareness and compression • Deep dive on AZ awareness • Benefits of Kafka Message Compression • Charts showing our benefits
  • 6. 6 Motivation: AWS Network Pricing Model Cross AZ Data Price ($) 1 GB 0.02 1 TB 20 1 PB 20,000
  • 7. 7 • Kafka brokers are grouped in Racks • Racks provide fault tolerance and each rack may be in a different physical location or has its own power source • In AWS, racks are generally mapped to Availability Zones • This talk uses the terms Rack and Availability Zone interchangeably
  • 9. 9Confidential & Proprietary ©SignalFx 2019
  • 10. 10Confidential & Proprietary ©SignalFx 2019
  • 11. 11Confidential & Proprietary ©SignalFx 2019
  • 12. 12Confidential & Proprietary ©SignalFx 2019
  • 13. 13Confidential & Proprietary ©SignalFx 2019
  • 14. 14Confidential & Proprietary ©SignalFx 2019
  • 15. 15 Simple Kafka Setup Kafka Setup + AZ aware routing Kafka Setup +Compression* Kafka Setup + AZ aware routing +Compression* Kafka Setup + AZ aware routing + Compression** AZ hops 4 2 4 2 2 Price 8U 4U 4U 3.2U 2U
  • 16. Deep Dive on Kafka AZ Awareness
  • 17. 17 We need our producers and consumers to talk to leader brokers in the same AZ.
  • 18. 18 • Kafka Producer needs to be aware of leader partitions in an AZ • Kafka client library can help us find the locations of leader partitions in an AZ • Then, the producer will have to produce messages onto those leader partitions
  • 19. 19 On producer initialization: String myRack = System.getProperty("KAFKA_PRODUCER_RACK", "defaultRack"); TopicDescription topicDescription = getTopicDescription(topicName); List<Integer> desiredPartitions = topicDescription.partitions().stream() .filter(p -> myRack.equals(getLeaderRack(p)) .map(TopicPartitionInfo::partition) .collect(Collectors.toList()); … To send a message: int partition = getPartition(message, desiredPartitions); ProducerRecord record = new ProducerRecord<>(topicName, partition, null, message); producer.send(record);
  • 20. 20 There are few things to consider before finalizing on desired partitions to produce messages. 1. What if partitions are not spread across brokers properly? 2. What if we don’t have any leader partitions in the same rack? 3. What happens to an already initialized state of desired partitions if replica assignment is updated? For 1 and 2, we default to spraying messages across all partitions. Then, we balance partitions assignment as an operational task. For 3, we just need a callback hook to be able to re-create desired partitions state after an update to assignment.
  • 21. 21 Kafka Cluster Group Coordinator
  • 23. 23 PartitionAssignor Kafka Java client library has an interface called PartitionAssignor, that allows us to define our own custom partition assignment strategy. public interface PartitionAssignor { /** * Return a serializable object representing the local * member’s subscription. */ Subscription subscription(Set<String> topics); /** * Perform the group assignment given the member subscriptions * and current cluster metadata. */ Map<String, Assignment> assign(Cluster metadata, Map<String, Subscription> subscriptions); ... }
  • 24. 24 PartitionAssignor Partitions can be assigned to consumers in the group based on different implementations of PartitionAssignor. For example: 1. RangeAssignor 2. RoundRobinAssignor 3. StickyAssignor 4. RackAwareAssignor * RangeAssignor is the default for a Kafka consumer. RackAwareAssignor is our implementation to get an AZ aware consumer assignment.
  • 25. 25 RangeAssignor An introductory example: Two consumers C0 and C1 and two topics t0 and t1 with 3 partitions each. Topic t0: t0p0, t0p1, t0p2 Topic t1: t1p0, t1p1, t1p2 Assignment will be: C0: [t0p0, t0p1, t1p0, t1p1] C1: [t0p2, t1p2]
  • 26. 26 RackAwareAssignor Two consumers C0 (R1) and C1 (R2), two topics t0 and t1 with 3 partitions each. Topic t0: t0p0 (R1), t0p1 (R2), t0p2 (R1) Topic t1: t1p0 (R1), t1p1 (R2), t1p2 (R2) R1 and R2 are racks where the leader partitions are located. Assignment will be: C0: [t0p0, t0p2, t1p0] C1: [t0p1, t1p1, t1p2]
  • 27. 27 RackAwareAssignor RackAwareAssignor.class is supplied as partition.assignment.strategy config value during consumer initialization. partition.assignment.strategy:[RackAwareAssignor.class, RangeAssignor.class] Most preferred PartitionAssignor suggested by all consumer group members is used for assignment. To update the strategy, you will have to include old, new strategy in the config value with new strategy followed by old. Then, after re-initializing majority of consumers in the group, your new strategy will be used.
  • 28. 28 RackAwareAssignor Step 1: maxNumOfPartitions = Math .ceil(topicPartitionsCount * 1.0 / totalConsumersCount); Step 2: Assign partitions to consumers from same rack while ensuring that any consumer has only up to maxNumOfPartitions partitions assigned. Step 3: Assign the remaining partitions to consumers with fewer assignments.
  • 29. 29 RackAwareAssignor private static final String RACK_KEY_NAME = "consumer_rack"; private static final String CONSUMER_RACK = System.getProperty("KAFKA_CONSUMER_RACK", "default"); private static final Schema CONSUMER_RACK_SCHEMA = new Schema(new Field(RACK_KEY_NAME, Type.STRING)); @Override public Subscription subscription(Set<String> topics) { ByteBuffer userData = serializeUserData(CONSUMER_RACK); return new Subscription(new ArrayList<>(topics), userData); } private static ByteBuffer serializeUserData(String rack) { Struct struct = new Struct(CONSUMER_RACK_SCHEMA); struct.set(RACK_KEY_NAME, rack); ByteBuffer buffer = ByteBuffer.allocate(CONSUMER_RACK_SCHEMA.sizeOf(struct)); CONSUMER_RACK_SCHEMA.write(buffer, struct); buffer.flip(); return buffer; } private static String deserializeUserData(ByteBuffer buffer) { Struct struct = CONSUMER_RACK_SCHEMA.read(buffer); return struct.getString(RACK_KEY_NAME); }
  • 30. Kafka AZ Awareness on Other Complicated Use Cases
  • 31. 31 Aggregations / Sequential Processing Related messages need to be enqueued on same partitions.
  • 32. 32 Fixed Consumer Assignment Related messages need to be processed on single consumer instance, without group membership changes (even when a consumer goes down). Each consumer instance owns a set of statically assigned tokens and those has to be mapped to their partitions.
  • 33. 33 Tokens - Partitions Assignment Partition assignment should be based on large ranges of tokens assigned to racks, not in any random order. For ex: with 6 partitions, 6 tokens, 3 brokers (broker id: 0, 1, 2 - 1 in each rack), the assignment could be:
  • 34. 34 Tokens - Partitions Assignment Problem: When broker 0 goes down, broker 1 gets all the load 1 1 1 1
  • 35. 35 Tokens - Partitions Assignment Better Assignment would like:
  • 36. 36 Tokens - Partitions Assignment When broker 0 goes down, broker 1 and 2 share the load
  • 37. 37 Kafka as Backup Store Consumer groups in all racks need to consume entire data on all partitions.
  • 38. 38 Fission Reaction When one update triggers multiple updates, AZ awareness will cause scalability troubles.
  • 40. 40 Kafka Message Compression • Kafka supports end-to-end compression • Data is compressed by the Kafka producer client • Data is written in compressed format on Kafka brokers, leading to savings on disk usage • Data is decompressed by Kafka consumer client
  • 41. 41 Kafka Message Compression • Enabling compression is as simple as setting the config compression.type on Kafka producer client • Compression uses extra CPU and memory on producer/consumer • Snappy compression type worked best for us
  • 42. 42 Benefits from AZ Awareness 45% decrease in Data Transfer - Regional Bytes
  • 43. 43 Benefits from AZ Awareness Decrease in average end-to-end latency over last day
  • 44. 44 Benefits from Message Compression Decrease in average bytes/message over last day