{"id":30174246,"url":"https://github.com/seuros/throttle_machines","last_synced_at":"2026-04-01T23:28:03.994Z","repository":{"id":308847656,"uuid":"1021922247","full_name":"seuros/throttle_machines","owner":"seuros","description":"Advanced rate limiting library for Ruby. Rate limit anything - API calls, AI requests, background jobs. Features GCRA, token bucket algorithms, circuit breakers, and multiple storage backends.","archived":false,"fork":false,"pushed_at":"2026-03-22T11:13:34.000Z","size":215,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-23T01:40:10.422Z","etag":null,"topics":["ai-rate-limiting","algorithm","background-jobs","circuit-breaker","concurrency","distributed-systems","gcra","limiter","memory-storage","performance","rate-limiter","rate-limiting","redis","resilience","ruby","ruby-gem","temporal-precision","throttle","throttling","token-bucket"],"latest_commit_sha":null,"homepage":null,"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/seuros.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-18T06:54:24.000Z","updated_at":"2026-03-22T11:13:31.000Z","dependencies_parsed_at":"2025-08-08T09:29:01.719Z","dependency_job_id":null,"html_url":"https://github.com/seuros/throttle_machines","commit_stats":null,"previous_names":["seuros/throttle_machines"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/seuros/throttle_machines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Fthrottle_machines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Fthrottle_machines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Fthrottle_machines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Fthrottle_machines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seuros","download_url":"https://codeload.github.com/seuros/throttle_machines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Fthrottle_machines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-rate-limiting","algorithm","background-jobs","circuit-breaker","concurrency","distributed-systems","gcra","limiter","memory-storage","performance","rate-limiter","rate-limiting","redis","resilience","ruby","ruby-gem","temporal-precision","throttle","throttling","token-bucket"],"created_at":"2025-08-12T00:44:46.696Z","updated_at":"2026-04-01T23:28:03.958Z","avatar_url":"https://github.com/seuros.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThrottleMachines 🚀\n\n\u003e **Ultra-thin rate limiting for the cosmos** - Where every request has its own trajectory through spacetime\n\nA precision-engineered Ruby rate limiting library built for interstellar traffic control.\nWhether you're throttling API calls, AI requests, or quantum communications, ThrottleMachines ensures your systems maintain perfect orbital stability.\n\n---\n\n## 🌌 Navigation\n\n* [🎯 Mission Control](docs/MISSION_CONTROL.md) - Quick start guide for captains\n* [🛸 Spacecraft Manual](docs/SPACECRAFT_MANUAL.md) - Understanding the fleet (algorithms)\n* [⚡ Warp Drive Configuration](docs/WARP_DRIVE.md) - Storage backends \u0026 performance\n* [🛡️ Shield Protocols](docs/SHIELD_PROTOCOLS.md) - Circuit breakers \u0026 defensive systems\n* [🌍 Planetary Integration](docs/PLANETARY_INTEGRATION.md) - Rails \u0026 Rack middleware\n* [🔬 Space Lab](docs/SPACE_LAB.md) - Testing in zero gravity\n* [📡 Telemetry](docs/TELEMETRY.md) - Monitoring \u0026 instrumentation\n* [🎮 Command Examples](docs/COMMAND_EXAMPLES.md) - Real mission scenarios\n* [📜 Mission Logs](docs/MISSION_LOGS.md) - Lessons from real incidents\n* [🚀 Advanced Features](docs/ADVANCED_FEATURES.md) - Next-generation capabilities\n\n---\n\n## 🚀 Launch Sequence\n\n```bash\n# Add to your ship's Gemfile\ngem 'throttle_machines'\n\n# For warp drive capabilities (Redis storage)\ngem 'redis'\n\n# For planetary Rails integration\ngem 'rails' # or just railties\n```\n\nThen initialize systems:\n```bash\nbundle install\n```\n\n---\n\n## 🎯 Quick Mission Brief\n\n### Basic Throttling - The Photon Torpedo Approach\n\n```ruby\n# Simple rate limiting - like controlling photon torpedo launches\ntorpedo_limiter = ThrottleMachines.limiter(\"photon_launcher\",\n  limit: 10,     # 10 torpedoes\n  period: 60     # per minute\n)\n\n# Check and consume approach\nif torpedo_limiter.allow?\n  torpedo_limiter.throttle!  # Consume one torpedo charge\n  launch_torpedo!\nelse\n  puts \"Torpedo bay recharging... Please wait.\"\nend\n\n# OR use the exception approach\nbegin\n  torpedo_limiter.throttle!\n  launch_torpedo!\nrescue ThrottleMachines::ThrottledError =\u003e e\n  puts \"Torpedo bay recharging... Retry after #{e.limiter.retry_after} seconds\"\nend\n```\n\n### GCRA - The Federation Diplomatic Ship 🛸\n\n```ruby\n# GCRA: Like a diplomatic vessel that smoothly navigates traffic\n# Instead of sudden stops, it gracefully manages flow\ndiplomatic_limiter = ThrottleMachines.limiter(\"federation_embassy\",\n  limit: 100,\n  period: 60,\n  algorithm: :gcra  # Generic Cell Rate Algorithm\n)\n\n# GCRA ensures smooth traffic - no thundering herds at your space dock!\n```\n\n### Block Form - Fire and Forget 🎯\n\n```ruby\n# Use the block form for automatic throttling\n# This handles the throttle! and error handling for you\nThrottleMachines.limit(\"warp_drive\", limit: 5, period: 60) do\n  engage_warp_drive!  # This will be throttled automatically\nend\n# Raises ThrottledError if limit exceeded\n```\n\n---\n\n## 🌠 The Ultra-Thin Philosophy\n\nLike the best spacecraft, ThrottleMachines follows the principle of **ultra-thin design**:\n\n- **No bloat** - Every component serves a critical function\n- **No dependencies** - Operates in deep space without supply lines\n- **Pure Ruby propulsion** - No alien technology required\n- **Modular systems** - Swap components like ship modules\n\n---\n\n## ⚡ Warp Factor Features\n\n- **🚀 Multiple Algorithms** - GCRA, Token Bucket, Fixed Window, Sliding Window\n- **💫 Distributed Ready** - Redis backend for fleet coordination\n- **🔄 Async Support** - Fiber-safe operations for quantum communications\n- **🏃 Hedged Requests** - Multi-path navigation for reduced latency\n- **🎯 Microsecond Precision** - Navigate the cosmos with temporal accuracy\n- **🔌 Pluggable Storage** - Memory crystals or Redis quantum storage\n- **🌍 Rails Integration** - Seamless planetary docking procedures\n- **📡 Rack Middleware** - Universal translator for all spacecraft\n- **🔍 Full Instrumentation** - Real-time telemetry via ActiveSupport::Notifications\n- **⚡ Thread-Safe** - Safe for multi-threaded spacecraft operations\n- **🎭 Multiple Usage Patterns** - Check-first, exception-based, or block form\n\n---\n\n## 🌌 Why ThrottleMachines?\n\nIn the vast expanse of cyberspace, your systems face:\n- **Asteroid fields** of concurrent requests\n- **Black holes** of resource exhaustion\n- **Alien attacks** from malicious actors\n- **Temporal anomalies** in distributed systems\n\nThrottleMachines is your navigation system through these dangers, ensuring safe passage for every request in your fleet.\n\n---\n\n## 📜 Captain's Log\n\nSee our [Mission Archives](CHANGELOG.md) for the full history of our voyages.\n\n---\n\n## 🤝 Join the Crew\n\n1. Signal your intent (`fork` the repository)\n2. Create your feature branch (`git checkout -b feature/quantum-throttling`)\n3. Document your modifications (`git commit -am 'Add quantum entanglement support'`)\n4. Transmit to mothership (`git push origin feature/quantum-throttling`)\n5. Request docking clearance (`Pull Request`)\n\n---\n\n## 📡 Distress Signals\n\nFound a breach in the hull? Encountered an unknown anomaly?\n- **Emergency beacon**: [GitHub Issues](https://github.com/seuros/throttle_machines/issues)\n- **Mission reports**: [Discussions](https://github.com/seuros/throttle_machines/discussions)\n\n---\n\n## 🎖️ Mission Credentials\n\nMIT License - See [LICENSE](LICENSE) for full transmission.\n\n---\n\n## A Message from the Temporal Defense Corps\n\n*The Quantum Navigation Computer flickers to life:*\n\n\"Space is vast. Time is relative. And your API is getting hammered by a bot farm in Eastern Europe.\n\nWelcome to the temporal wars, where milliseconds matter and rate limits are the thin line between order and chaos. You think you're just limiting requests? No, pilot. You're manipulating the very fabric of spacetime to ensure fair resource distribution across the quantum multiverse of your distributed system.\n\nEvery request has a trajectory. Every limit has a purpose. Every algorithm is a different spacecraft designed for a specific mission through the hostile void.\n\nThe universe doesn't care about your startup's runway or your clever blog post about 'Building a Rate Limiter in 5 Minutes with Redis.' It cares about one immutable law:\n\n**Can your system maintain temporal stability when the thundering herd arrives?**\n\nIf not, welcome aboard. We have algorithms.\"\n\n*— Quantum Navigation Computer, Log Entry ∞*\n\n---\n\n## The Fleet Admiral's Warning\n\nSo you built a microservice architecture because a YouTube video told you it was 'web scale'?\n\nNow you're drowning in a sea of uncontrolled requests, cascade failures, and that one service that keeps calling your API 10,000 times per second because someone forgot to implement exponential backoff.\n\nThis is your life raft. Don't let go.\n\n---\n\n**\"In space, nobody can hear your servers scream. But with ThrottleMachines, they won't need to.\"**\n\n*— Fleet Admiral J'Rao, Survivor of the Great DDoS Wars of 2019*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseuros%2Fthrottle_machines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseuros%2Fthrottle_machines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseuros%2Fthrottle_machines/lists"}