-
Notifications
You must be signed in to change notification settings - Fork 21
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
DBS access frequency control #600
Comments
I posted my response in another ticket, but for completeness it should go here: For apache we can use mod_evasive or mod_throttle, while for DBS backend I didn't find explicitly cherrypy solution and we should probably write our own. But for Flask we can use If we'll need to write our own throttling for DBS (WMCore in general) it should track clients based on DN's (to allow catch bulk requests from distributed clients), we can whitelist production system DNs. |
@vkuznet |
You probably don't really want a rate limiter but rather a concurrency limiter -- no one cares if you do many cheap queries. We do this in CRAB to prevent users from hitting the service with many queries in parallel: It happens on the backend since the resources there are more precious... |
amazing how much more fancy CRAB is than I never realized (nor suspected) !
sounds like nobody ever gets throttled in there, but surely it is good to
know that it does not create any harm :-)
|
This looks perfect, @amaltaro, Alan can we put this code into WMCore?
The only downside that it appears in CRAB first rather then WMCore.
If we put it into WMCore we may patch CRAB to load it from WMCore instead of
CRABInterface. @belforte, Stefano will you agree on this, i.e.
put this code into WMCore and modify CRABInterface to load it from there?
If we'll agree to do it we can ask Yuyi to decorate DBS APIs and test it.
…On 0, Brian P Bockelman ***@***.***> wrote:
You probably don't really want a rate limiter but rather a concurrency limiter -- no one cares if you do many cheap queries.
We do this in CRAB to prevent users from hitting the service with many queries in parallel:
dmwm/CRABServer@7601be8
It happens on the backend since the resources there are more precious...
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#600 (comment)
|
yes I agree to move this from CRAB to WMCore repo.
|
Ok, I ported code from CRABServer into WMCore, see dmwm/WMCore#9158 @yuyiguo , Yuyi you can look at unit test I provided (https://github.com/dmwm/WMCore/blob/7b2ec2a690d03e8066dcc56d182070a0c451c09b/test/python/Utils_t/Throttled_t.py) and implement something similar for DBS. Basically what you need to do is to add an additional decorator to your API method which you'd like to throttle, e.g.
|
@belforte , Stefano, here is relevant PR for CRABServer: dmwm/CRABServer#5880 |
@vkuznet @belforte @amaltaro @bbockelm
DBS servers was frequently crushed for a period of time as described in #595. The root cause was a client made hundreds even thousands of threads against DBS. The risk behavior affected entire DBS clients. In order to prevent this happens again, We need to put a limit on how many calls a client can make per minute? Should the limit based on DN? Should we distinguish between individual user vs production system? Where should the limit be front end or backend?
The text was updated successfully, but these errors were encountered: