{"id":19311587,"url":"https://github.com/rednafi/nginx-ratelimit","last_synced_at":"2025-04-12T11:22:53.077Z","repository":{"id":215710778,"uuid":"739616988","full_name":"rednafi/nginx-ratelimit","owner":"rednafi","description":"A simple hello-world JSON API service that incorporates rate limiting via Nginx.","archived":false,"fork":false,"pushed_at":"2024-01-07T12:22:34.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T06:11:28.500Z","etag":null,"topics":["go","golang","nginx","nginx-docker","nginx-proxy","rate-limit","rate-limiter","rate-limiting"],"latest_commit_sha":null,"homepage":"https://rednafi.com/go/rate_limiting_via_nginx/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rednafi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-06T02:47:05.000Z","updated_at":"2024-10-11T07:34:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce144e0c-24e0-4a14-b02b-3a2792f5b8a0","html_url":"https://github.com/rednafi/nginx-ratelimit","commit_stats":null,"previous_names":["rednafi/nginx-ratelimit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fnginx-ratelimit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fnginx-ratelimit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fnginx-ratelimit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fnginx-ratelimit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rednafi","download_url":"https://codeload.github.com/rednafi/nginx-ratelimit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248558455,"owners_count":21124290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","nginx","nginx-docker","nginx-proxy","rate-limit","rate-limiter","rate-limiting"],"created_at":"2024-11-10T00:29:28.657Z","updated_at":"2025-04-12T11:22:53.056Z","avatar_url":"https://github.com/rednafi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-ratelimit\n\n\nA simple hello-world JSON API service that incorporates rate limiting via Nginx. It allows \n50 requests per second and returns a 429 error when the limit is exceeded.\n\nSee the blog post [here].\n\n## Installation\n\n```sh\ngit clone git@github.com:rednafi/nginx-ratelimit\n```\n\n## Take it for a spin\n\n-   Start the service:\n\n    ```sh\n    docker compose up -d\n    ```\n\n-   Test the rate limiting by sending many requests:\n\n    ```sh\n    seq 200 | xargs -n 1 -P 100 bash -c 'curl -s localhost/greetings|jq'\n    ```\n\n    This returns:\n\n    ```json\n    {\n        \"message\": \"Hello World\"\n    }\n    {\n        \"message\": \"Hello World\"\n    }\n    ...\n    {\n        \"status\": 429,\n        \"message\": \"Too Many Requests\"\n    }\n    {\n        \"status\": 429,\n        \"message\": \"Too Many Requests\"\n    }\n    {\n        \"message\": \"Hello World\"\n    }\n    {\n        \"status\": 429,\n        \"message\": \"Too Many Requests\"\n    }\n    ```\n\n\n[here]: https://rednafi.com/go/rate_limiting_via_nginx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frednafi%2Fnginx-ratelimit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frednafi%2Fnginx-ratelimit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frednafi%2Fnginx-ratelimit/lists"}