druid/docs
AmatyaAvadhanula 7bf1d8c5c0
Facilitate lazy initialization of connections to mitigate overwhelming of Coordinator (#12298)
Add config for eager / lazy connection initialization in ResourcePool

Description
Currently, when multiple tasks are launched, each of them eagerly initializes a full pool's worth of connections to the coordinator.

While this is acceptable when the parameter for number of eagerConnections (== maxSize) is small, this can be problematic in environments where it's a large value (say 1000) and multiple tasks are launched simultaneously, which can cause a large number of connections to be created to the coordinator, thereby overwhelming it.

Patch
Nodes like the broker may require eager initialization of resources and do not create connections with the Coordinator.
It is unnecessary to do this with other types of nodes.

A config parameter eagerInitialization is added, which when set to true, initializes the max permissible connections when ResourcePool is initialized.

If set to false, lazy initialization of connection resources takes place.

NOTE: All nodes except the broker have this new parameter set to false in the quickstart as part of this PR

Algorithm
The current implementation relies on the creation of maxSize resources eagerly.

The new implementation's behaviour is as follows:

If a resource has been previously created and is available, lend it.
Else if the number of created resources is less than the allowed parameter, create and lend it.
Else, wait for one of the lent resources to be returned.
2022-03-09 23:17:43 +05:30
..
_bin De-incubation cleanup in code, docs, packaging (#9108) 2020-01-03 12:33:19 -05:00
assets Design/architecture doc touchups (#11762) 2021-10-04 11:09:35 -07:00
comparisons Update druid-vs-kudu.md (#11470) 2021-07-21 22:58:14 +08:00
configuration Facilitate lazy initialization of connections to mitigate overwhelming of Coordinator (#12298) 2022-03-09 23:17:43 +05:30
dependencies Doc updates for metadata cleanup and storage (#12190) 2022-01-27 11:40:54 -08:00
design Allow coordinator run auto compaction duty period to be configured separately from other indexing duties (#12263) 2022-02-18 23:02:57 -08:00
development Adding Shared Access resource support for azure (#12266) 2022-02-22 18:27:43 +05:30
ingestion Batch ingestion replace (#12137) 2022-03-08 20:07:02 -07:00
misc Refactor SQL docs (#12239) 2022-02-11 14:43:30 -08:00
operations add a new query laning metrics to visualize lane assignment (#12111) 2022-03-04 15:21:17 +08:00
querying GroupBy: Cap dictionary-building selector memory usage. (#12309) 2022-03-08 13:13:11 -08:00
tutorials Officially support Java 11. (#12232) 2022-03-04 14:15:45 -08:00