A Ruby gem providing flexible concurrency and rate limiting for async applications.
Please see the project documentation for more details.
-
Getting Started - This guide explains how to get started the
async-limiter
gem for controlling concurrency and rate limiting in Ruby applications. -
Generic Limiter - This guide explains the
Async::Limiter::Generic
class, which provides unlimited concurrency by default and serves as the base implementation for all other limiters. It's ideal when you need timing constraints without concurrency limits, or when building custom limiter implementations. -
Limited Limiter - This guide explains the
Async::Limiter::Limited
class, which provides semaphore-style concurrency control, enforcing a maximum number of concurrent operations. It's perfect for controlling concurrency when you have limited capacity or want to prevent system overload. -
Queued Limiter - This guide explains the
Async::Limiter::Queued
class, which provides priority-based task scheduling with optional resource management. Its key feature is priority-based acquisition where higher priority tasks get access first, with optional support for distributing specific resources from a pre-populated queue. -
Timing Strategies - This guide explains how to use timing strategies to provide rate limiting and timing constraints that can be combined with any limiter. They control when operations can execute, while limiters control how many can execute concurrently.
-
Token Usage - This guide explains how to use tokens for advanced resource management with
async-limiter
. Tokens provide sophisticated resource handling with support for re-acquisition and automatic cleanup.
- falcon - A high-performance web server
- async-http - Asynchronous HTTP client and server
- async - The core async framework
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create new Pull Request.
In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.