{"id":37024684,"url":"https://github.com/ggrandes/concurrentlimit-servlet-filter","last_synced_at":"2026-01-14T02:59:30.495Z","repository":{"id":144611037,"uuid":"108771567","full_name":"ggrandes/concurrentlimit-servlet-filter","owner":"ggrandes","description":"Concurrent Limit Servlet Filter for a container like Tomcat","archived":false,"fork":false,"pushed_at":"2025-08-27T17:57:41.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T02:22:43.120Z","etag":null,"topics":["concurrent","filter","http","ip","java","limit","request","servlet","tomcat"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ggrandes.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,"zenodo":null}},"created_at":"2017-10-29T21:09:30.000Z","updated_at":"2025-08-27T17:57:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba28fd23-d620-42f8-acff-186d8455dffd","html_url":"https://github.com/ggrandes/concurrentlimit-servlet-filter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ggrandes/concurrentlimit-servlet-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggrandes%2Fconcurrentlimit-servlet-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggrandes%2Fconcurrentlimit-servlet-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggrandes%2Fconcurrentlimit-servlet-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggrandes%2Fconcurrentlimit-servlet-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggrandes","download_url":"https://codeload.github.com/ggrandes/concurrentlimit-servlet-filter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggrandes%2Fconcurrentlimit-servlet-filter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["concurrent","filter","http","ip","java","limit","request","servlet","tomcat"],"created_at":"2026-01-14T02:59:29.829Z","updated_at":"2026-01-14T02:59:30.486Z","avatar_url":"https://github.com/ggrandes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Concurrent Limit Servlet Filter\n\nProvides concurrent control in a Servlet container like Tomcat. Open Source Java project under Apache License v2.0\n\n### Current Development Version is [2.0.0](https://search.maven.org/#search|ga|1|g%3Aorg.javastack%20a%3Aconcurrentlimit-servlet-filter-jakarta)\n\n---\n\n## DOC\n\nThis filter works limiting access for specified URI.\n\n1. Check if the IP has been seen in the last X milliseconds.\n2. If not seen, try to acquire access (concurrent) for resource.\n3. If any of this checks fail, HTTP code 429 (Too Many Requests) is returned to the client as described in [RFC-6585](http://tools.ietf.org/html/rfc6585#page-3).\n\n#### Usage Example\n\n```xml\n\u003c!-- Servlet Filter --\u003e\n\u003c!-- WEB-INF/web.xml --\u003e\n\u003cfilter\u003e\n    \u003cfilter-name\u003eConcurrentLimitFilter\u003c/filter-name\u003e\n    \u003cfilter-class\u003eorg.javastack.servlet.filters.ConcurrentLimitFilter\u003c/filter-class\u003e\n    \u003c!-- Example 5 concurrent updates, same IP allowed one time every 5 seconds --\u003e\n    \u003cinit-param\u003e\n        \u003cparam-name\u003e/rest/update\u003c/param-name\u003e\n        \u003c!-- concurrent-limit[:ip-time-limit-millis] --\u003e\n        \u003cparam-value\u003e5:5000\u003c/param-value\u003e\n    \u003c/init-param\u003e\n    \u003c!-- Example one delete per second from same IP --\u003e\n    \u003cinit-param\u003e\n        \u003cparam-name\u003e/rest/delete\u003c/param-name\u003e\n        \u003cparam-value\u003e0:1000\u003c/param-value\u003e\n    \u003c/init-param\u003e\n    \u003c!-- How many IPs are remembered for each URI, default: 8192 --\u003e\n    \u003cinit-param\u003e\n        \u003cparam-name\u003eipMaxSize\u003c/param-name\u003e\n        \u003cparam-value\u003e4096\u003c/param-value\u003e\n    \u003c/init-param\u003e\n\u003c/filter\u003e\n\u003cfilter-mapping\u003e\n    \u003cfilter-name\u003eConcurrentLimitFilter\u003c/filter-name\u003e\n    \u003curl-pattern\u003e/rest/*\u003c/url-pattern\u003e\n\u003c/filter-mapping\u003e\n```\n\n---\n\n## MAVEN\n\nAdd the dependency to your pom.xml:\n\n###### jakarta.servlet (tomcat 10+)\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.javastack\u003c/groupId\u003e\n        \u003cartifactId\u003econcurrentlimit-servlet-filter-jakarta\u003c/artifactId\u003e\n        \u003cversion\u003e2.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n###### javax.servlet (tomcat 8.5, 9)\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.javastack\u003c/groupId\u003e\n        \u003cartifactId\u003econcurrentlimit-servlet-filter\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n---\nInspired in [mod_ratelimit](https://httpd.apache.org/docs/2.4/es/mod/mod_ratelimit.html), this code is Java-minimalistic version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggrandes%2Fconcurrentlimit-servlet-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggrandes%2Fconcurrentlimit-servlet-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggrandes%2Fconcurrentlimit-servlet-filter/lists"}