{"id":13747268,"url":"https://github.com/dpep/berater_rb","last_synced_at":"2025-07-26T02:41:59.781Z","repository":{"id":45153034,"uuid":"101712031","full_name":"dpep/berater_rb","owner":"dpep","description":"work within limits","archived":false,"fork":false,"pushed_at":"2024-11-18T15:07:06.000Z","size":473,"stargazers_count":20,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-01T04:23:55.032Z","etag":null,"topics":["concurrency-limiter","limiter","rate-limiter"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/dpep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-08-29T02:53:03.000Z","updated_at":"2024-11-27T21:12:19.000Z","dependencies_parsed_at":"2024-04-11T00:25:49.734Z","dependency_job_id":"92aee952-b59a-4d50-af3e-0715e16429e8","html_url":"https://github.com/dpep/berater_rb","commit_stats":{"total_commits":304,"total_committers":2,"mean_commits":152.0,"dds":"0.013157894736842146","last_synced_commit":"fef3a990c2060efa078205794db743143b86ceb3"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/dpep/berater_rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpep%2Fberater_rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpep%2Fberater_rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpep%2Fberater_rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpep%2Fberater_rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpep","download_url":"https://codeload.github.com/dpep/berater_rb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpep%2Fberater_rb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267109068,"owners_count":24037616,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"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":["concurrency-limiter","limiter","rate-limiter"],"created_at":"2024-08-03T06:01:23.312Z","updated_at":"2025-07-26T02:41:59.688Z","avatar_url":"https://github.com/dpep.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"Berater\n======\n![Gem](https://img.shields.io/gem/dt/berater?style=plastic)\n[![codecov](https://codecov.io/gh/dpep/berater_rb/branch/main/graph/badge.svg?token=1L7OD80182)](https://codecov.io/gh/dpep/berater_rb)\n\n\nAll systems have limits, beyond which they tend to fail.  Berater makes working within limits easy and the inevitable failures more graceful.\n\n\n```ruby\nrequire 'berater'\nrequire 'redis'\n\nBerater.configure do |c|\n  c.redis = Redis.new\nend\n\nBerater(:key, 3) do\n  # allow only three simultaneous requests with a concurrency limiter\nend\n\nBerater(:key, 2, interval: :minute) do\n  # or do work twice per minute with a rate limiter\nend\n```\n\nSee [documentation](https://github.com/dpep/berater_rb/wiki) for details.\n\n\n----\n## Contributing\n\nYes please  :)\n\n1. Fork it\n1. Create your feature branch (`git checkout -b my-feature`)\n1. Ensure the tests pass (`bundle exec rspec`)\n1. Commit your changes (`git commit -am 'awesome new feature'`)\n1. Push your branch (`git push origin my-feature`)\n1. Create a pull request\n\n\n----\n### Inspired by\n\nhttps://stripe.com/blog/rate-limiters\n\nhttps://github.blog/2021-04-05-how-we-scaled-github-api-sharded-replicated-rate-limiter-redis\n\n[@ptarjan](https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff574d)\n\nhttps://en.wikipedia.org/wiki/Leaky_bucket\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpep%2Fberater_rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpep%2Fberater_rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpep%2Fberater_rb/lists"}