Falcon Limiter
Advanced concurrency control and resource limiting for Falcon web server, built on top of async-limiter.
Features
This gem provides sophisticated concurrency management for Falcon applications by:
- Connection Limiting: Control the number of concurrent connections to prevent server overload.
- Long Task Management: Handle I/O vs CPU bound workloads effectively by releasing resources during long operations.
- Priority-based Resource Allocation: Higher priority tasks get preferential access to limited resources.
- Automatic Resource Cleanup: Ensures proper resource release even when exceptions occur.
- Built-in Statistics: Monitor resource utilization and contention.
Usage
Please see the project documentation for more details.
-
Getting Started - This guide explains how to get started with
falcon-limiterfor advanced concurrency control and resource limiting in Falcon web applications. -
Long Tasks - This guide explains how to use
Falcon::Limiter::LongTaskto effectively manage I/O vs CPU bound workloads in your Falcon applications.
Releases
Please see the project releases for all releases.
v0.5.0
- Add optional
Falcon::Limiter::LongTask#start(tags:)metadata for instrumentation.
v0.4.0
- Add
Falcon::Limiter::LongTask#pending?for detecting delayed long tasks which have not acquired yet.
v0.3.0
- Use
Async::Limiter::Token#closewhen closing sockets so cached tokens cannot re-acquire after socket close.
v0.2.0
- Use
async-limiterv2.2 utilization metrics for connection and long task limiter telemetry.
v0.1.0
- Initial implementation.
See Also
- falcon - A fast, asynchronous, rack-compatible web server.
- async-limiter - Execution rate limiting for Async.
- async - A concurrency framework for Ruby.
Contributing
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.
Running Tests
To run the test suite:
bundle exec susMaking Releases
To make a new release:
bundle exec bake gem:release:patch # or minor or majorDeveloper Certificate of Origin
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.
Community Guidelines
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.