Closed RohitKumarGit closed 1 month ago
DB load balancing is a very complex task and it is not viable (or necessary) to add to the core.
This scenario can be solved easily with many approaches.
a) Launch multiple DungBeetle instances that speak to different result DBs and load/queue balance across them. b) Put a robust DB load balancing solution between DungBeetle and the results DB, eg: pgBouncer.
Hi @knadh I was studying the design of dungbeetle and I realized a scenario where this design might see bottleneck as per my understanding
As per my understanding the workers fetch one job from the QUEUE and then write it to
primary_db
andresult_db
( for frequent operations and then removed after a time-to-live time ) and result_db is a single one ( chosed from list randomly )which we declare when we start the process inconfig
fileNow consider the worst-case like this
result_db
result_db
starts facing bottleneckIn short
result_db
is like a single point of failure irrespective of number of workers we haveProposed Solution
result_db
options and makes it as primary result databaseif we implement this feedback on brokers then
autoscalers
like in kubernetes could use it to scale our workers on a particular queue. for this we need to implement a way to accept workers and create task tables just like redhat openshift does this for it's worker nodes