Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable query request queuing by default when total laning is turned on. #15440

Merged

Conversation

abhishekagarwal87
Copy link
Contributor

@abhishekagarwal87 abhishekagarwal87 commented Nov 28, 2023

This PR enables the flag by default to queue excess query requests in the jetty queue. Still keeping the flag so that it can be turned off if necessary. But the flag will be removed in the future.

Release notes

  • When query scheduler threads are less than server HTTP threads, total laning becomes on. This lets reserve some HTTP threads for non-query requests such as health checks. The total laning previously would reject any query request that exceeds the lane capacity. But now, those excess requests will instead be queued with a timeout equal to MIN(Integer.MAX_VALUE, druid.server.http.maxQueryTimeout)

if value of druid.server.http.maxQueryTimeout is negative, then the excess requests will be queued forever.

This PR has:

  • been self-reviewed.
  • been tested in a test Druid cluster.

@LakshSingla
Copy link
Contributor

Perhaps we should point it out in the developer release notes in the next release.

@gianm
Copy link
Contributor

gianm commented Nov 28, 2023

The docs for druid.query.scheduler.numThreads should be updated too, as the out of box config will no longer result in HTTP 429 when the scheduler limit is exceeded.

@abhishekagarwal87
Copy link
Contributor Author

Updated the docs.

@abhishekagarwal87 abhishekagarwal87 merged commit 468b99e into apache:master Jan 9, 2024
83 checks passed
@LakshSingla LakshSingla added this to the 29.0.0 milestone Jan 29, 2024
@maytasm
Copy link
Contributor

maytasm commented Oct 4, 2024

Is this doc incorrect https://github.com/apache/druid/blob/master/docs/configuration/index.md?plain=1#L1777
It says "Requests in excess of the capacity are discarded with an HTTP 429 status code."

@abhishekagarwal87
Copy link
Contributor Author

No. It's correct. This PR queues requests when the total lane is at capacity but any other lane will still see the excess request being rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants