Hi team, few questions on Kafka supervisor behavio...
# general
a
Hi team, few questions on Kafka supervisor behaviour. If anyone can provide pointers on this it will be helpful. Thanks: 1. With
stopTaskCount=2
,
taskCount=4
and
replicas=2
, does
stopTaskCount
stop 2 task groups (all replicas included), or 2 individual tasks(staggering the two replicas)? 2. With same config as above, will both replicas of a task group start at the same time? During
intermediatePersistPeriod
flushes, will both hit persist roughly simultaneously? If one peon is blocked on merge buffer acquisition, can the
broker
use the other replica's peon to serve the query, or does it wait for both?
g
1- I believe
stopTaskCount
is an entire group, so
2
means 2 task groups
2- replicas do start at the same time. their flushes are not explicitly synchronized. they may tend to happen around the same time, but each task is ultimately flushing independently. the Broker will use only one replica per query, so it doesn't need to wait for both for a single query.
a
thanks @Gian Merlino for checking Is there way we can ensure task replica are not in sync explicitly, so that their flushes during
intermediatePersistPeriod
and
handoff
don't happen at same time. If we could offset them, the broker could route to the non-persisting replica when one is blocked on merge buffer acquisition during persist/handoff
g
what about persist makes it be blocked on merge buffer acquisition? I haven't noticed that before
a
@Gian Merlino currently we have
intermediatePersistPeriod
set to 5m and we notice every 5m, the query timeouts as there seems to be resource contention as most of thread/buffer are utilised by ingestion + persist, leaving lesser for query to utilise when running
g
hmm. the thread and buffer pools used by ingest and query are not shared with each other. It could be that the task is running in an overall resource-constrained or oversubscribed situation (VM, container, etc)
a
oh ok, thanks
@Gian Merlino, have a follow-up question. If too many realtime queries are coming to a single hot MiddleManager node, would having two replicas help distribute that load across two peons on two different nodes? Thanks
a
If too many realtime queries are coming to a single hot MiddleManager node, would having two replicas help distribute that load across two peons on two different nodes?
Yes that would help. Task replicas will bind to different MMs and the broker will load balance queries across them. By default,
druid.broker.balancer.type
(defaults to random) determines how the broker will balance queries to historicals & realtime tasks: https://druid.apache.org/docs/latest/configuration/#query-configuration
If you're in 37.0.0 or so, this one is made configurable for realtime & historical if you want to add custom strategies based on your query workloads
a
ack, thanks for details
I am using druid 30.0.1v, and even in latest version it seems description for
druid.broker.balancer.type
is cut off. Anything is missing here cc: @Gian Merlino @Abhishek Balaji Radhakrishnan
a
Yep, I think we could rephrase that sentence 🙂 Do you want to contribute?
a
sure