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

Add load-based throttling to search endpoints #116

Merged
merged 5 commits into from
Jan 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exec/Chainweb/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ searchTxs logger pool req givenMbLim mbOffset (Just search) mbNext = do
continuation <- mkContinuation readTxToken mbOffset mbNext
let
resultLimit = maybe 10 (min 100 . unLimit) givenMbLim
scanLimit = 20000
scanLimit = 50000

strategy <- getExecutionStrategy req scanLimit

Expand Down Expand Up @@ -599,7 +599,7 @@ evHandler logger pool req limit mbOffset qSearch qParam qName qModuleName minhei
, espModuleName = qModuleName
}
resultLimit = fromMaybe 100 $ limit <&> \(Limit l) -> min 100 l
scanLimit = 20000
scanLimit = 50000

strategy <- getExecutionStrategy req scanLimit

Expand Down