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 a request limit for tier2 service, if reached service sets itself as not ready. #402

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

colindickson
Copy link
Contributor

as discussed

service/tier2.go Outdated
overloaded = false
}
if overloaded {
defer s.connectionCountMutex.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no defer!

service/tier2.go Outdated
@@ -121,6 +126,26 @@ func (s *Tier2Service) ProcessRange(request *pbssinternal.ProcessRangeRequest, s
var err error
ctx := streamSrv.Context()

overloaded := true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverse this logic (default: false)

service/tier2.go Outdated
defer func() {
s.connectionCountMutex.Lock()
s.currentConcurrentRequests--
s.setReadyFunc(s.runtimeConfig.MaxConcurrentRequests == 0 || s.currentConcurrentRequests < s.runtimeConfig.MaxConcurrentRequests)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transform this into a function (use same as line 131)

@sduchesneau
Copy link
Contributor

Add to CHANGELOG

@colindickson colindickson force-pushed the feature/tier2-request-limit branch from cf73f25 to c21aca1 Compare March 11, 2024 15:28
@sduchesneau
Copy link
Contributor

TODO: add the prometheus metrics for active requests on a tier2 in our graphs
sum(grpc_server_started_total{namespace=~"sol-mainnet",grpc_method="ProcessRange"}) by (pod) - sum(grpc_server_handled_total{namespace=~"sol-mainnet",grpc_method="ProcessRange"} ) by (pod)

@sduchesneau
Copy link
Contributor

TODO: ensure that the tier1 never fails on tier2 unavailable (I think there's a retry counter limit...)

@colindickson colindickson merged commit a8ae829 into develop Mar 11, 2024
7 checks passed
@sduchesneau sduchesneau deleted the feature/tier2-request-limit branch April 25, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants