limit_conn_zone $binary_remote_addr zone=floodip:100m;
limit_conn floodip 10;

limit_req_zone $binary_remote_addr zone=flood:100m rate=5r/s;
limit_req zone=flood burst=10;