Play framework with Request Limiter
1 Application Level
object ConcurrentRequestsLimiter extends Filter {}
We can access to the RequestHeader.
object LoggingFilter extends EssentialFilter {}
We can access to the whole Request.
We can limit the concurrent requests for Playframework.
2 Proxy Level
Limit the requests on NodeJS proxy
https://journal.paul.querna.org/articles/2010/09/04/limiting-concurrency-node-js/
Maybe I need to put a limit rate on my Playframework to protect my server side.
3 LoadBalance Level
HAProxy
http://blog.serverfault.com/2010/08/26/1016491873/
https://blog.codecentric.de/en/2014/12/haproxy-http-header-rate-limiting/
NGINX
http://nginx.org/en/docs/http/ngx_http_limit_req_module.html
http://serverfault.com/questions/179646/nginx-throttle-requests-to-prevent-abuse
References:
Controller the Concurrent Users/Requests
https://github.com/inoio/play-requests-limiter
Filter
https://www.playframework.com/documentation/2.4.3/ScalaHttpFilters
https://www.playframework.com/documentation/2.3.4/ScalaInterceptors
Find a way to Perf Testing
http://sillycat.iteye.com/blog/2109369
https://github.com/luohuazju/sillycat-gatling
Play framework with Request Limiter
猜你喜欢
转载自sillycat.iteye.com/blog/2260995
今日推荐
周排行