`
sillycat
  • 浏览: 2487426 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Play framework with Request Limiter

 
阅读更多
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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics