georgew5656 opened a new pull request, #14649:
URL: https://github.com/apache/druid/pull/14649
### Description
This is a performance optimization for the KubernetesTaskRunner. For larger
numbers of tasks (especially if they are streaming), there are a lot of
getTaskLocation calls on the task runner (e.g. supervisors make this call
periodically). Currenly the K8s task runner has to find the pod by querying k8s
and grab the pod IP even though it doesn't change unless the pod dies (in which
case the task would have already failed).
I have tried testing this with on the order of 200 supervisor tasks and the
druid console starts getting really slow. After this change I am able to go up
to at least 1000 tasks without an issue on the overlord (haven't tried more
than this).
#### Release note
Performance optimization for k8s task runner.
##### Key changed/added classes in this PR
* KubernetesPeonLifecycle
I considered adding a watcher on the pod instead to be safe but I think that
would also cause issues, we can revisit that in the future if we decide we need
it.
This PR has:
- [X] been self-reviewed.
- [ ] using the [concurrency
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
(Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [X] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [X] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [X] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]