nginx でリクエストを制限できるモジュール「ngx_http_limit_req_module」を使うと,Throttling や DoS 対策など,リクエストの過剰な増加に nginx で対応できるようになる.挙動を確認するため,Docker Compose を使って検証環境を構築した. nginx.org 検証環境 今回 Docker Compose を使って,nginx と Sinatra を起動する検証環境を構築した.コンテナは計4種類で,以下の構成図にまとめた.今回は default.conf の異なる3種類の nginx (Frontend1-3) の挙動を確認する. Frontend1 (nginx) : limit_req Frontend2 (nginx) : limit_req + burst Frontend3 (nginx) : limit_req + burs
![nginx でリクエストを制限できるモジュール「ngx_http_limit_req_module」 - kakakakakku blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/f7d273938b311a6c32aceb2ffbae2a7752dd3433/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fk%2Fkakku22%2F20190825%2F20190825131113.png)