https://github.com/smacker/gateway-limit
https://github.com/smacker/gateway-limit
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/smacker/gateway-limit
- Owner: smacker
- Created: 2017-07-04T11:25:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-04T11:36:27.000Z (almost 9 years ago)
- Last Synced: 2025-04-30T05:29:53.827Z (about 1 year ago)
- Language: Lua
- Size: 2.93 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Limit 1 r/s, burst 2 r/s
```
$ ./run.sh
172.17.0.1 - - [04/Jul/2017:11:28:19 +0000] "GET /secure/ HTTP/1.1" 200 39 "-" "Go-http-client/1.1" "-"
172.17.0.1 - - [04/Jul/2017:11:28:19 +0000] "GET /secure/ HTTP/1.1" 503 219 "-" "Go-http-client/1.1" "-"
172.17.0.1 - - [04/Jul/2017:11:28:19 +0000] "GET /secure/ HTTP/1.1" 503 219 "-" "Go-http-client/1.1" "-"
172.17.0.1 - - [04/Jul/2017:11:28:20 +0000] "GET /secure/ HTTP/1.1" 200 39 "-" "Go-http-client/1.1" "-"
172.17.0.1 - - [04/Jul/2017:11:28:21 +0000] "GET /secure/ HTTP/1.1" 200 39 "-" "Go-http-client/1.1" "-"
$ go run test.go
200
503
503
200
200
```