版本信息 [root@master nginx]# nginx -v Tengine version: Tengine/2.3.1 nginx version: nginx/1.16.0
主要是用于做负载均衡这块 upstream game_test { consistent_hash $request_uri; server 10.241.106.94:8080 id=1001; check interval=5000 rise=2 fall=3 timeout=10000 type=http port=8080; check_http_send "HEAD /pocket-creature-backend/run HTTP/1.0\r\n\r\n\r\n"; check_http_expect_alive http_2xx
配置 limit_req_zone $binary_remote_addr zone=one:30m rate=6r/s; limit_req_zone $binary_remote_addr $uri zone=two:30m rate=5r/s; limit_req_zone $binary_remote_addr $request_uri zone=three:30m rate=5r/s; limit_req_status 444; 引用到负载均衡上了。 limit_req zone=two;
输出日志 183.48.126.88 [14/Sep/2019:22:49:56 444 "POST /pocket-creature-backend/user/updateStoryPieces 183.48.126.88 [14/Sep/2019:22:49:56 444 "POST /pocket-creature-backend/user/checkTimelimitPackage 183.48.126.88 [14/Sep/2019:22:49:56 444 "POST /pocket-creature-backend/user/updateStoryPieces 183.48.126.88 [14/Sep/2019:22:49:56 200 "POST /pocket-creature-backend/user/updateStoryPieces 问题反馈: 相同的ip地址并且访问相同的url 限流没有起到作用,只是对同一个IP地址有作用