Druid Ingestion: From 3 hr to 5 min
Shivji kumar Jha, Staff Engineer, Nutanix
Sachidananda Maharana, MTS 4, Nutanix
Challenges, Mitigations & Learnings
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
About Us
Shivji Kumar Jha
Staff Engineer,
CPaaS Data Platform,
Nutanix
Sachidananda Maharana
Sr Engineer / OLAP Ninja
CPaaS Team, Nutanix
 Software Engineer & Regular Speaker / Meetups
 Excited about:
 Distributed Databases & Streaming
 Open-Source Software & Communities
 MySQL, Postgres, Pulsar/NATS, Druid/Clickhouse
 Regular Platform Engineer
 Excited about:
 Distributed OLAP Databases
 Open-Source Enthusiast
Contents
Druid 101
How we use Druid
Re-architecture : What & Why
Impact On Druid components
How we fixed the issues
State of Bugs we filed / fixed
Druid 101
• Open-source, Apache 2.0 License and under Apache Foundation
• Columnar data store designed for high-performance.
• Supports Real-time and Batch ingestion.
• Segment Oriented Storage
• Distributed and modular architecture, horizontally scalable for most
parts
• Supports Data tiering – Keep cold data in cheaper storage!
What we love about Druid!
Modularity - Separation of Concerns
Modularity – Simplicity* : Ease to deploy , Upgrade, Migrate, Manage
Modularity – Flexibility - Scale only what you need, Retain based on retention rules on tiers
Modularity - Built for Cloud
Durability – Object Store (S3 or Nutanix Objects for instance) for Deep Storage
Durability - SQL database for metadata
Admin Dashboard – easier debugging and monitoring
Write
Read
Druid 101
Ingestion & Query Patterns
● IPFix log files are collected from clouds.
○ IPFIX : IP Flow Information Export
○ Summarizes network data packets to track IP actions
● We enrich data and store in an s3 bucket.
● S3 data is ingested into druid.
● Serves Analytics dashboards in slice and dice manner.
● Used for ML engine as well.
Druid Nos : 3+ years in Prod
Last 24 hrs
Cluster Size
Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes
Data Model for our Apps
● Analytics Apps as part of Nutanix Dashboard
● Customers can slice and dice data given some filters
● Multi-tenant Use Case
● Druid Data source per customer per use case
● Enable features for some data sources
○ Phased rollout for new Druid features
○ Druid Version Upgrades
○ App redesign requiring Change in Druid ingestion or query.
● Workflow engine (Temporal) for pipeline.
● Java based Workers backed by Postgres storage for state.
Change in Requirements
● Change in Requirement: Batch (3 hours) to 5 minutes
● Earlier:
○ Agent collects data, dumps to S3.
○ Cron runs every 3 hour, ingests from S3 to Druid
○ SLA : 3 hours
● New Design:
○ SLA : 15 minutes
○ Agent collects data, dumps to S3 every 5 minutes.
○ Ingestion Pipeline ingests to Druid depending on what Druid likes.
○ Ingestion Pipeline gobbles backpressure.
● Release Plan
○ Data sources uploaded to cluster in a phased manner
Before: old batch system
Cron : 3 hrs
Change: Batch to near-real-time system
nudge State
Machine,
absorb
backpressure
Cron : 5 mins
Batch to near-real-time system
Cron : 5 mins
Druid
Ingestion
Tasks
Druid Database
Druid Database
Datasource 1
Druid Database
Datasource 3
Datasource 2
Datasource 1
Druid Database
Datasource N
Datasource 3
Datasource 2
Datasource 1
Druid Database
Datasource N
Datasource 3
Datasource 2
Datasource 1
Druid Database
Datasource N
Datasource 3
Datasource 2
Datasource 1
Druid Database
Datasource N
Datasource 3
Datasource 2
Datasource 1
Proof of the Pudding !
Proof of the Pudding(2) !
Proof of the Pudding(3) !
Summary: When Druid was struggling (Overlord on
fire)
● Ingested smaller, but more tasks.
● onboarding a few large datasources, fine for a day
● More confidence 
● Onboarded all datasource at once
○ Task queue kept increasing (till 25K). Overlord overwhelmed after 5K
○ Soon, overlord machine CPU usage at 100%
● All the tasks were stuck in pending state
● Task count was 12x more than previous but smaller.
● Middle managers were sitting idle, no incoming tasks.
● Task state were not updating properly as overlord was overwhelmed.
Druid Overlord
Getting Overlord Alive
Druid Database
Overlord Process
Druid Database
Overlord Process
Bigger VM
Druid Database
Overlord Process
Bigger DB Instance
Bigger VM
Handling the Overlord…
● Vertically scale overlord. Didn’t help! No support for horizontal
scaling.
● Changed configs:
Handling the Overlord…
● Vertically scale overlord. Didn’t help! No support for horizontal
scaling.
● Changed configs: No
ZK for
assignment
Druid.indexer.runner.type : httpRemote
Handling the Overlord…
● Vertically scale overlord. Didn’t help! No support for horizontal
scaling.
● Changed configs:
Throttle,
Don’t give up
Druid.indexer.runner.type : httpRemote
Druid.indexer.queue.maxSize : 5000
Handling the Overlord…
● Vertically scale overlord. Didn’t help! No support for horizontal
scaling.
● Changed configs:
● Set max pending tasks per datasource for an interval to 1
Throttle,
Don’t give up
Druid.indexer.runner.type : httpRemote
Druid.indexer.queue.maxSize : 5000
GET /druid/indexer/v1/pendingTasks?datasource=ds1
Filed Github issues so you don’t hit these…
Fixed Issues (PR)
Making DB functional…
● Queries from overlord to Postgres for
task metadata were taking long time.
● Add more CPU to DB server
● Improvements:
○ Overlord CPU utilization is less
○ Number of pending tasks are less
○ Task slot utilization graph looks stable
Scaling Middle Managers
Druid Database
Peon Processes
Middle managers
Druid Database
Middle managers
Peon Processes
More VMs
Druid Database
Middle managers
Peon Processes
More VMs
Bigger Compact tasks
Tiering Middle Managers
Druid Database
More slots per Middle Managers
More VMs
More slots
Bigger Compact tasks
Druid Database
Right size Middle Managers
Less VMs
More slots
Bigger Compact tasks
Summary : Scaling Middle Manager
● Increased number of middle manager as so
that more task slots are available for
overlord to assign tasks.
● Then we increased number of slots per
middle manager as new tasks were small
i.e. having less number of files to ingest.
● We created a separate tier for compaction
as these tasks took more resource then the
current index tasks.
● Then we right sized the middle manager
count in each tier by reducing it.
12 MMs * 5 slots => 24MMs * 5 slots
24 MMs * 5 slots => 12MMs * 10 slots
12 MMs * 10 slots =>
10 MMs * 10 slots + 2 MMs *5 slots
Tiering
Coordinator Issues
Coordinator Issues
Coordinator Issues
Coordinator Issues
Summary of Coordinator crisis…
● Happy Overlord.
● But issues in Coordinator now:
○ Huge number of small segments.
○ Unavailable segments count increasing.
○ Coordinator CPU usage increasing
○ Coordinator cycle is taking too long to complete
Fixing Coordinator
Druid Database
Handling the Coordinator
Coordinator Process
Druid Database
Handling the Coordinator
Coordinator Process
Bigger VM
Druid Database
Handling the Coordinator
Coordinator Process
Bigger VM
Same big DB
Handling the Coordinator…
● Increased Coordinator instance type as it is not scalable
horizontally
● Tried the following coordinator dynamic configs:
Handling the Coordinator…
● Increased Coordinator instance type as it is not scalable
horizontally
● Tried few coordinator dynamic configs:
maxSegmentsToMove: 1000
percentOfSegmentsToConsiderPerMove: 25
reducing the
number of
segments per
coordinator
cycle
Handling the Coordinator…
● Increased Coordinator instance type as it is not scalable
horizontally
● Tried few coordinator dynamic configs:
maxSegmentsToMove: 1000
percentOfSegmentsToConsiderPerMove: 25
Assign segments
In round-robin
fashion first.
Lazily reassign with
chosen balancer
strategy later
useRoundRobinSegmentAssignment: true
Handling the Coordinator…
● We saw this error in coordinator logs during
auto compaction for many datasources.
“is larger than inputSegmentSize[2147483648]”
● Removing this setting from auto compaction
config resolved the issue.
● This is no longer an issue Druid 25 onwards.
inputSegmentSizeBytes: 100TB
Handling the Historicals
● Until auto compaction done:
○ More no of segments for queries
○ More processing power for historicals
● Cold data has HIGHER segment
granularity
○ Compaction Done!
● Hot data has LOWER segment
granularity
○ Compaction NOT done YET!
Query for
recent data
Query for
recent data
Older Historicals
Current Historicals
Larger segments
Smaller segments
Datasource 2
Datasource 1
Datasource 1
Datasource 2
Druid Database
Happy State!!!
Summary
● Once we stabilized Druid Ingestion and query both pipelines we
onboarded all customers in a phased manner.
● Set the optimal queue size.
● To absorb the initial burst of tasks we increased MM count.
● Right size Overlord and coordinator once the onboarding was
complete
● Do know overlord and coordinator settings well.
Thank You
Questions?
Shivji Kumar Jha
linkedin.com/in/shivjijha/
slideshare.net/shiv4289/presentations/
youtube.com/@shivjikumarjha
Sachidananda Maharana
https://www.linkedin.com/in/sachidanandamaharana/

More Related Content

PPTX
Batch to near-realtime: inspired by a real production incident
PDF
20th Athens Big Data Meetup - 1st Talk - Druid: the open source, performant, ...
PDF
Druid: Under the Covers (Virtual Meetup)
PDF
Druid Adoption Tips and Tricks
PDF
August meetup - All about Apache Druid
PPTX
Druid deep dive
PPTX
Understanding apache-druid
PDF
A Day in the Life of a Druid Implementor and Druid's Roadmap
Batch to near-realtime: inspired by a real production incident
20th Athens Big Data Meetup - 1st Talk - Druid: the open source, performant, ...
Druid: Under the Covers (Virtual Meetup)
Druid Adoption Tips and Tricks
August meetup - All about Apache Druid
Druid deep dive
Understanding apache-druid
A Day in the Life of a Druid Implementor and Druid's Roadmap

Similar to Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes (20)

PDF
Aggregated queries with Druid on terrabytes and petabytes of data
PDF
Druid meetup @ Netflix (11/14/2018 )
PDF
Real-time analytics with Druid at Appsflyer
PDF
Apache Druid 101
PDF
PDF
Archmage, Pinterest’s Real-time Analytics Platform on Druid
PDF
Druid in Spot Instances
PDF
PDF
Analytics over Terabytes of Data at Twitter
PDF
Druid at Strata Conf NY 2016.pdf
PDF
Apache Druid®: A Dance of Distributed Processes
PDF
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
PDF
Deep dive into druid
PPTX
The of Operational Analytics Data Store
PPTX
Big data processing engines, Atlanta Meetup 4/30
PPTX
Apache Druid Design and Future prospect
PDF
OSN_2022.pdf
PPT
Data Applications and Infrastructure at LinkedIn__HadoopSummit2010
PDF
What does Netflix, NTT and Rubicon Project have in common? Apache Druid.
PPTX
Druid: Sub-Second OLAP queries over Petabytes of Streaming Data
Aggregated queries with Druid on terrabytes and petabytes of data
Druid meetup @ Netflix (11/14/2018 )
Real-time analytics with Druid at Appsflyer
Apache Druid 101
Archmage, Pinterest’s Real-time Analytics Platform on Druid
Druid in Spot Instances
Analytics over Terabytes of Data at Twitter
Druid at Strata Conf NY 2016.pdf
Apache Druid®: A Dance of Distributed Processes
Don’t Forget About Your Past—Optimizing Apache Druid Performance With Neil Bu...
Deep dive into druid
The of Operational Analytics Data Store
Big data processing engines, Atlanta Meetup 4/30
Apache Druid Design and Future prospect
OSN_2022.pdf
Data Applications and Infrastructure at LinkedIn__HadoopSummit2010
What does Netflix, NTT and Rubicon Project have in common? Apache Druid.
Druid: Sub-Second OLAP queries over Petabytes of Streaming Data
Ad

More from Shivji Kumar Jha (20)

PDF
Navigating Transactions: ACID Complexity in Modern Databases
PPTX
osi-oss-dbs.pptx
PPTX
pulsar-platformatory-meetup-2.pptx
PDF
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
PDF
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
PDF
Pulsar summit asia 2021: Designing Pulsar for Isolation
PPTX
Event sourcing Live 2021: Streaming App Changes to Event Store
PPTX
Apache Con 2021 Structured Data Streaming
PPTX
Apache Con 2021 : Apache Bookkeeper Key Value Store and use cases
PDF
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
PDF
Pulsar Summit Asia - Structured Data Stream with Apache Pulsar
PDF
Pulsar Summit Asia - Running a secure pulsar cluster
PDF
lessons from managing a pulsar cluster
PDF
FOSSASIA 2015: MySQL Group Replication
PDF
MySQL High Availability with Replication New Features
PDF
MySQL Developer Day conference: MySQL Replication and Scalability
PDF
MySQL User Camp: MySQL Cluster
PDF
MySQL User Camp: GTIDs
PDF
Open source India - MySQL Labs: Multi-Source Replication
PDF
MySQL User Camp: Multi-threaded Slaves
Navigating Transactions: ACID Complexity in Modern Databases
osi-oss-dbs.pptx
pulsar-platformatory-meetup-2.pptx
Pulsar Summit Asia 2022 - Streaming wars and How Apache Pulsar is acing the b...
Pulsar Summit Asia 2022 - Keeping on top of hybrid cloud usage with Pulsar
Pulsar summit asia 2021: Designing Pulsar for Isolation
Event sourcing Live 2021: Streaming App Changes to Event Store
Apache Con 2021 Structured Data Streaming
Apache Con 2021 : Apache Bookkeeper Key Value Store and use cases
How pulsar stores data at Pulsar-na-summit-2021.pptx (1)
Pulsar Summit Asia - Structured Data Stream with Apache Pulsar
Pulsar Summit Asia - Running a secure pulsar cluster
lessons from managing a pulsar cluster
FOSSASIA 2015: MySQL Group Replication
MySQL High Availability with Replication New Features
MySQL Developer Day conference: MySQL Replication and Scalability
MySQL User Camp: MySQL Cluster
MySQL User Camp: GTIDs
Open source India - MySQL Labs: Multi-Source Replication
MySQL User Camp: Multi-threaded Slaves
Ad

Recently uploaded (20)

PPTX
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
PPTX
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB
PPT
3.Software Design for software engineering
PDF
Internet Download Manager IDM Crack powerful download accelerator New Version...
PPTX
ERP Manufacturing Modules & Consulting Solutions : Contetra Pvt Ltd
PDF
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PDF
CapCut PRO for PC Crack New Download (Fully Activated 2025)
PDF
Sanket Mhaiskar Resume - Senior Software Engineer (Backend, AI)
PPTX
HackYourBrain__UtrechtJUG__11092025.pptx
PPTX
Human Computer Interaction lecture Chapter 2.pptx
PPTX
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
PPTX
Why 2025 Is the Best Year to Hire Software Developers in India
PDF
Top 10 Project Management Software for Small Teams in 2025.pdf
PPTX
Human-Computer Interaction for Lecture 2
PDF
Practical Indispensable Project Management Tips for Delivering Successful Exp...
PPTX
string python Python Strings: Literals, Slicing, Methods, Formatting, and Pra...
PPTX
ROI Analysis for Newspaper Industry with Odoo ERP
PDF
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
PDF
Sun and Bloombase Spitfire StoreSafe End-to-end Storage Security Solution
DevOpsDays Halifax 2025 - Building 10x Organizations Using Modern Productivit...
WJQSJXNAZJVCVSAXJHBZKSJXKJKXJSBHJBJEHHJB
3.Software Design for software engineering
Internet Download Manager IDM Crack powerful download accelerator New Version...
ERP Manufacturing Modules & Consulting Solutions : Contetra Pvt Ltd
IDM Crack 6.42 Build 42 Patch Serial Key 2025 Free New Version
Understanding the Need for Systemic Change in Open Source Through Intersectio...
CapCut PRO for PC Crack New Download (Fully Activated 2025)
Sanket Mhaiskar Resume - Senior Software Engineer (Backend, AI)
HackYourBrain__UtrechtJUG__11092025.pptx
Human Computer Interaction lecture Chapter 2.pptx
Plex Media Server 1.28.2.6151 With Crac5 2022 Free .
Why 2025 Is the Best Year to Hire Software Developers in India
Top 10 Project Management Software for Small Teams in 2025.pdf
Human-Computer Interaction for Lecture 2
Practical Indispensable Project Management Tips for Delivering Successful Exp...
string python Python Strings: Literals, Slicing, Methods, Formatting, and Pra...
ROI Analysis for Newspaper Industry with Odoo ERP
MiniTool Power Data Recovery 12.6 Crack + Portable (Latest Version 2025)
Sun and Bloombase Spitfire StoreSafe End-to-end Storage Security Solution

Druid Summit 2023 : Changing Druid Ingestion from 3 hours to 5 minutes

  • 1. Druid Ingestion: From 3 hr to 5 min Shivji kumar Jha, Staff Engineer, Nutanix Sachidananda Maharana, MTS 4, Nutanix Challenges, Mitigations & Learnings
  • 3. About Us Shivji Kumar Jha Staff Engineer, CPaaS Data Platform, Nutanix Sachidananda Maharana Sr Engineer / OLAP Ninja CPaaS Team, Nutanix  Software Engineer & Regular Speaker / Meetups  Excited about:  Distributed Databases & Streaming  Open-Source Software & Communities  MySQL, Postgres, Pulsar/NATS, Druid/Clickhouse  Regular Platform Engineer  Excited about:  Distributed OLAP Databases  Open-Source Enthusiast
  • 4. Contents Druid 101 How we use Druid Re-architecture : What & Why Impact On Druid components How we fixed the issues State of Bugs we filed / fixed
  • 5. Druid 101 • Open-source, Apache 2.0 License and under Apache Foundation • Columnar data store designed for high-performance. • Supports Real-time and Batch ingestion. • Segment Oriented Storage • Distributed and modular architecture, horizontally scalable for most parts • Supports Data tiering – Keep cold data in cheaper storage!
  • 6. What we love about Druid! Modularity - Separation of Concerns Modularity – Simplicity* : Ease to deploy , Upgrade, Migrate, Manage Modularity – Flexibility - Scale only what you need, Retain based on retention rules on tiers Modularity - Built for Cloud Durability – Object Store (S3 or Nutanix Objects for instance) for Deep Storage Durability - SQL database for metadata Admin Dashboard – easier debugging and monitoring
  • 8. Ingestion & Query Patterns ● IPFix log files are collected from clouds. ○ IPFIX : IP Flow Information Export ○ Summarizes network data packets to track IP actions ● We enrich data and store in an s3 bucket. ● S3 data is ingested into druid. ● Serves Analytics dashboards in slice and dice manner. ● Used for ML engine as well.
  • 9. Druid Nos : 3+ years in Prod Last 24 hrs Cluster Size
  • 11. Data Model for our Apps ● Analytics Apps as part of Nutanix Dashboard ● Customers can slice and dice data given some filters ● Multi-tenant Use Case ● Druid Data source per customer per use case ● Enable features for some data sources ○ Phased rollout for new Druid features ○ Druid Version Upgrades ○ App redesign requiring Change in Druid ingestion or query. ● Workflow engine (Temporal) for pipeline. ● Java based Workers backed by Postgres storage for state.
  • 12. Change in Requirements ● Change in Requirement: Batch (3 hours) to 5 minutes ● Earlier: ○ Agent collects data, dumps to S3. ○ Cron runs every 3 hour, ingests from S3 to Druid ○ SLA : 3 hours ● New Design: ○ SLA : 15 minutes ○ Agent collects data, dumps to S3 every 5 minutes. ○ Ingestion Pipeline ingests to Druid depending on what Druid likes. ○ Ingestion Pipeline gobbles backpressure. ● Release Plan ○ Data sources uploaded to cluster in a phased manner
  • 13. Before: old batch system Cron : 3 hrs
  • 14. Change: Batch to near-real-time system nudge State Machine, absorb backpressure Cron : 5 mins
  • 15. Batch to near-real-time system Cron : 5 mins Druid Ingestion Tasks
  • 19. Druid Database Datasource N Datasource 3 Datasource 2 Datasource 1
  • 20. Druid Database Datasource N Datasource 3 Datasource 2 Datasource 1
  • 21. Druid Database Datasource N Datasource 3 Datasource 2 Datasource 1
  • 22. Druid Database Datasource N Datasource 3 Datasource 2 Datasource 1
  • 23. Proof of the Pudding !
  • 24. Proof of the Pudding(2) !
  • 25. Proof of the Pudding(3) !
  • 26. Summary: When Druid was struggling (Overlord on fire) ● Ingested smaller, but more tasks. ● onboarding a few large datasources, fine for a day ● More confidence  ● Onboarded all datasource at once ○ Task queue kept increasing (till 25K). Overlord overwhelmed after 5K ○ Soon, overlord machine CPU usage at 100% ● All the tasks were stuck in pending state ● Task count was 12x more than previous but smaller. ● Middle managers were sitting idle, no incoming tasks. ● Task state were not updating properly as overlord was overwhelmed. Druid Overlord
  • 30. Druid Database Overlord Process Bigger DB Instance Bigger VM
  • 31. Handling the Overlord… ● Vertically scale overlord. Didn’t help! No support for horizontal scaling. ● Changed configs:
  • 32. Handling the Overlord… ● Vertically scale overlord. Didn’t help! No support for horizontal scaling. ● Changed configs: No ZK for assignment Druid.indexer.runner.type : httpRemote
  • 33. Handling the Overlord… ● Vertically scale overlord. Didn’t help! No support for horizontal scaling. ● Changed configs: Throttle, Don’t give up Druid.indexer.runner.type : httpRemote Druid.indexer.queue.maxSize : 5000
  • 34. Handling the Overlord… ● Vertically scale overlord. Didn’t help! No support for horizontal scaling. ● Changed configs: ● Set max pending tasks per datasource for an interval to 1 Throttle, Don’t give up Druid.indexer.runner.type : httpRemote Druid.indexer.queue.maxSize : 5000 GET /druid/indexer/v1/pendingTasks?datasource=ds1
  • 35. Filed Github issues so you don’t hit these…
  • 37. Making DB functional… ● Queries from overlord to Postgres for task metadata were taking long time. ● Add more CPU to DB server ● Improvements: ○ Overlord CPU utilization is less ○ Number of pending tasks are less ○ Task slot utilization graph looks stable
  • 41. Druid Database Middle managers Peon Processes More VMs Bigger Compact tasks Tiering Middle Managers
  • 42. Druid Database More slots per Middle Managers More VMs More slots Bigger Compact tasks
  • 43. Druid Database Right size Middle Managers Less VMs More slots Bigger Compact tasks
  • 44. Summary : Scaling Middle Manager ● Increased number of middle manager as so that more task slots are available for overlord to assign tasks. ● Then we increased number of slots per middle manager as new tasks were small i.e. having less number of files to ingest. ● We created a separate tier for compaction as these tasks took more resource then the current index tasks. ● Then we right sized the middle manager count in each tier by reducing it. 12 MMs * 5 slots => 24MMs * 5 slots 24 MMs * 5 slots => 12MMs * 10 slots 12 MMs * 10 slots => 10 MMs * 10 slots + 2 MMs *5 slots Tiering
  • 49. Summary of Coordinator crisis… ● Happy Overlord. ● But issues in Coordinator now: ○ Huge number of small segments. ○ Unavailable segments count increasing. ○ Coordinator CPU usage increasing ○ Coordinator cycle is taking too long to complete
  • 51. Druid Database Handling the Coordinator Coordinator Process
  • 52. Druid Database Handling the Coordinator Coordinator Process Bigger VM
  • 53. Druid Database Handling the Coordinator Coordinator Process Bigger VM Same big DB
  • 54. Handling the Coordinator… ● Increased Coordinator instance type as it is not scalable horizontally ● Tried the following coordinator dynamic configs:
  • 55. Handling the Coordinator… ● Increased Coordinator instance type as it is not scalable horizontally ● Tried few coordinator dynamic configs: maxSegmentsToMove: 1000 percentOfSegmentsToConsiderPerMove: 25 reducing the number of segments per coordinator cycle
  • 56. Handling the Coordinator… ● Increased Coordinator instance type as it is not scalable horizontally ● Tried few coordinator dynamic configs: maxSegmentsToMove: 1000 percentOfSegmentsToConsiderPerMove: 25 Assign segments In round-robin fashion first. Lazily reassign with chosen balancer strategy later useRoundRobinSegmentAssignment: true
  • 57. Handling the Coordinator… ● We saw this error in coordinator logs during auto compaction for many datasources. “is larger than inputSegmentSize[2147483648]” ● Removing this setting from auto compaction config resolved the issue. ● This is no longer an issue Druid 25 onwards. inputSegmentSizeBytes: 100TB
  • 58. Handling the Historicals ● Until auto compaction done: ○ More no of segments for queries ○ More processing power for historicals ● Cold data has HIGHER segment granularity ○ Compaction Done! ● Hot data has LOWER segment granularity ○ Compaction NOT done YET! Query for recent data Query for recent data Older Historicals Current Historicals Larger segments Smaller segments Datasource 2 Datasource 1 Datasource 1 Datasource 2
  • 60. Summary ● Once we stabilized Druid Ingestion and query both pipelines we onboarded all customers in a phased manner. ● Set the optimal queue size. ● To absorb the initial burst of tasks we increased MM count. ● Right size Overlord and coordinator once the onboarding was complete ● Do know overlord and coordinator settings well.
  • 61. Thank You Questions? Shivji Kumar Jha linkedin.com/in/shivjijha/ slideshare.net/shiv4289/presentations/ youtube.com/@shivjikumarjha Sachidananda Maharana https://www.linkedin.com/in/sachidanandamaharana/