Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
OSN_2022.pdf
1. Don't Forget Your Past, From Batch to
Real-Time and Back Again with
Apache Druid
Open Source North 2022
Neil Buesing, Rill Data
@nbuesing nbuesing
2. Goals
1. Technology Overview of Apache Druid and Apache Ka
fk
a
2. How to run Apache Druid and Apache Ka
fk
a locally
3. Druid Ingestion in batch and real-time
4. Query the data using Druid SQL Console and Apache Superset
5. Con
fi
gure Apache Druid Real-Time Ingestion to make it safe to reload
historical segments
6. Real-Time and Batch Ingestion: working together.
4. Apache Druid
1. Apache Druid still uses term master (hoping for a rename)
2. runs with coordinator, if druid.coordinator.asOverlord.enabled=true
3. indexer - incubating replacement for middlemanager, peons are threads, not processes
4. postgres or MySQL
Query
broker
router
Command(1)
coordinator
overlord(2)
Data
middlemanager(3)
historical
Dependencies
metadata store(4)
zookeeper
peon(s)
Storage
5. • File Format
• Segmentation
• Time
• Dimensions
• Metrics
__time dimensions metrics
Apache Druid
6. Apache Druid
• Time
• Segment Granularity
• Query Granularity
__time dimensions metrics
__time dimensions metrics
2021-12-07 T 22:00:00 Z
2021-12-07 T 22:15:00 Z
2021-12-07 T 22:18:34.123 Z
2021-12-07 T 22:18:00.000 Z 22:15:00
22:18:00
22:15:00
22:18:00
22:09:00
22:09:00
22:05:00
22:13:00
7. Apache Druid
• Why Query Granularity?
• Partially
Precomputed
Aggregates
__time dimensions metrics
2021-12-07 T 22:18:34.123 Z
2021-12-07 T 22:18:00.000 Z
22:18:49
22:18:00
22:18:34 Cloud 9 1234A
Store SKU
1
COUNT QTY
Cloud 9 1234A 1
4
3
Cloud 9 1234A 2 7
24. Kafka Local
• https://github.com/nbuesing/ka
fk
a-local
• ka
fk
a
• druid
• superset
• ka
fk
a-connect
• ksqlDB
• mongo
• grafana/prometheus dashboards
• mysql
• oracle*
• and more
* Must Build container yourself (instructions provided) - not M1 compatible
25. Kafka Local
• Container Based Environment
• Each component its own docker-compose "mix-n-match"
• shared network
• demos with up/setup/down scripts for easy up and run
• druid_late
• druid_rollup
• opensky
Today's Demo