{"id":17928028,"url":"https://github.com/kostis-codefresh/traefik-rate-limit-demo","last_synced_at":"2026-05-01T09:31:39.849Z","repository":{"id":109861007,"uuid":"411216745","full_name":"kostis-codefresh/traefik-rate-limit-demo","owner":"kostis-codefresh","description":"Example of rate limiting with Traefik in Kubernetes","archived":false,"fork":false,"pushed_at":"2021-10-20T08:10:56.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T09:43:35.740Z","etag":null,"topics":["ingress","kubernetes","rate-limiting","traefik"],"latest_commit_sha":null,"homepage":"https://traefik.io/blog/rate-limiting-on-kubernetes-applications/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kostis-codefresh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-09-28T09:27:09.000Z","updated_at":"2023-07-20T11:03:06.000Z","dependencies_parsed_at":"2023-03-13T14:02:18.221Z","dependency_job_id":null,"html_url":"https://github.com/kostis-codefresh/traefik-rate-limit-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kostis-codefresh/traefik-rate-limit-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Ftraefik-rate-limit-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Ftraefik-rate-limit-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Ftraefik-rate-limit-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Ftraefik-rate-limit-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostis-codefresh","download_url":"https://codeload.github.com/kostis-codefresh/traefik-rate-limit-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostis-codefresh%2Ftraefik-rate-limit-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ingress","kubernetes","rate-limiting","traefik"],"created_at":"2024-10-28T21:01:36.926Z","updated_at":"2026-05-01T09:31:39.828Z","avatar_url":"https://github.com/kostis-codefresh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rate limit your Kubernetes applications with Codefresh and Traefik\n\n[Rate Limiting](https://en.wikipedia.org/wiki/Rate_limiting) is a technique for controlling the rate of requests to your application.\n\nIt can save you from denial of service attacks or resource starvation problems.\n\n[Traefik](https://traefik.io/) is a proxy that supports rate limiting out of the box\nand can also work as a Kubernetes ingress.\n\n## How to build and run the application container\n\nRun\n\n```\ncd simple-web-app\ndocker build . -t my-app\ndocker run -p 8080:8080 my-app\n```\n\n then visit http://localhost:8080 in your browser\n\nYou can find prebuilt images at [https://hub.docker.com/r/kostiscodefresh/traefik-demo-app](https://hub.docker.com/r/kostiscodefresh/traefik-demo-app)\n\n## Deploying to Kubernetes with Codefresh\n\nThere is a Codefresh pipeline for 2 environments (QA and Prod)\nthat you can use at [codefresh.yml](codefresh.yml)\n\n## Deploying with rate limits\n\nFirst install traefik in your cluster\n\n```\nhelm repo add traefik https://helm.traefik.io/traefik\nkubectl create ns traefik\nhelm install --namespace=traefik traefik traefik/traefik\n```\n\nCreate the two namespaces\n\n```\nkubectl create ns qa\nkubectl create ns prod\n```\n\nDeploy using Codefresh or manually with\n\n```\nkubectl apply -f manifests-qa/* -n qa\nkubectl apply -f manifests-prod/* -n prod\n```\n\n## Test rate limiting\n\nYou can use several testing tools such as\n\n* [ab](https://httpd.apache.org/docs/current/programs/ab.html)\n* [siege](https://github.com/JoeDog/siege)\n* [hey](https://github.com/rakyll/hey)\n* [fortio](https://github.com/fortio/fortio) \n\nExample with siege\n\n```\nsiege -c 10 -r 20  http://kostis-eu.sales-dev.codefresh.io/prod\nsiege -c 10 -r 20  http://kostis-eu.sales-dev.codefresh.io/qa\n```\n\nIn the second run you should see responses with HTTP code 429 (too many requests).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostis-codefresh%2Ftraefik-rate-limit-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostis-codefresh%2Ftraefik-rate-limit-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostis-codefresh%2Ftraefik-rate-limit-demo/lists"}