Is there a built-in way to throttle the number of requests to the server?
For example; in our game it is physically impossible to send more than a few requests from the client per 100ms via normal player interaction. If this rate is breached, I want to kick the offending user (as it's likely a bot).
Can this be done?
Server Command Throttle
Re: Server Command Throttle
Hi,
yes under the Flood Filter in the Zone Configurator of the AdminTool.
Here you can add a custom rate limiter for every request, with the Exception of Extensions requests.
Extension requests are a different story because the server doesn't know what they do and thus limiting them with a global cap would likely break some game logic.
For Extensions you should implement a custom throttle, based on your needs.
Cheers
yes under the Flood Filter in the Zone Configurator of the AdminTool.
Here you can add a custom rate limiter for every request, with the Exception of Extensions requests.
Extension requests are a different story because the server doesn't know what they do and thus limiting them with a global cap would likely break some game logic.
For Extensions you should implement a custom throttle, based on your needs.
Cheers
Re: Server Command Throttle
For Extensions you should implement a custom throttle, based on your needs.
Just to confirm, is this done via a Filter? Does SFS2X have any foundation classes for this or is it ground-up work? Either answer is ok, I just want to be sure before I start work on it
Re: Server Command Throttle
It's not done via a filter. Filters exist for "system" requests but not for Extensions calls.
One way to introduce a request limiter is via a base class common to all your Extension's request handlers.
The base class could implement the logic for keeping track of each request rate (per user) and then each request handler could inherit from that class and invoke that logic before executing any other code.
I think it could also be implemented at a more lower level in the API by us and be generic enough to satisfy most use cases, but we'd need a deeper investigation.
It's good you brought this up I've added a link to this post in our todo/feature list do we revisit this topic for a future release.
Hope it helps
One way to introduce a request limiter is via a base class common to all your Extension's request handlers.
The base class could implement the logic for keeping track of each request rate (per user) and then each request handler could inherit from that class and invoke that logic before executing any other code.
I think it could also be implemented at a more lower level in the API by us and be generic enough to satisfy most use cases, but we'd need a deeper investigation.
It's good you brought this up I've added a link to this post in our todo/feature list do we revisit this topic for a future release.
Hope it helps
Re: Server Command Throttle
Aha, this makes perfect sense.
Thank you!
Thank you!
Who is online
Users browsing this forum: Google [Bot] and 108 guests