Async::Container
Provides containers which implement parallelism for clients and servers.
Features
- Supports multi-process, multi-thread and hybrid containers.
- Automatic scalability based on physical hardware.
- Direct integration with systemd using
$NOTIFY_SOCKET. - Internal process readiness protocol for handling state changes.
- Automatic restart of failed processes.
Usage
Please browse the source code index or refer to the guides below.
Getting Started
This guide explains how to use async-container to build basic scalable systems.
Container Policies
This guide explains how to use policies to monitor container health and implement custom failure handling strategies.
Systemd Integration
This guide explains how to use async-container with systemd to manage your application as a service.
Kubernetes Integration
This guide explains how to use async-container with Kubernetes to manage your application as a containerized service.
Releases
Please browse the releases for more details.
v0.34.2
- Once a container is stopped, it stays stopped.
v0.34.0
- Add
Async::Container::Generic#stopping?so that policies can more accurately track the state of the container.
v0.33.0
- Add
Policy#make_statisticsto allow policies to customize statistics initialization.
v0.32.1
- Expose
Async::Container::Controller#notify,#container_class, and#graceful_stopfor testing.
v0.32.0
- Minor breaking changes to
Async::Container::Policyinterface. - Expose
Async::Container::Statistics::Rate#window.
v0.31.0
- Introduce
Async::Container::Policyfor managing child lifecycle events and implementing custom failure handling strategies. - Add
Async::Container::Statistics::Ratefor tracking failure and restart rates over sliding time windows. - Fix restart counter to only increment when actually restarting (check
@runningflag).
v0.30.0
SIGTERMis now graceful, the same asSIGINT, for better compatibility with Kubernetes and systemd.ASYNC_CONTAINER_INTERRUPT_TIMEOUTandASYNC_CONTAINER_TERMINATE_TIMEOUTare removed and replaced byASYNC_CONTAINER_GRACEFUL_TIMEOUT.
v0.29.0
- Introduce
Client#healthy!for sending health check messages.
v0.28.0
- Add
startup_timeoutparameter tospawnandrunmethods for detecting processes that hang during startup and never become ready. - Health check timeout now only applies after a process becomes ready, preventing premature timeouts for slow-starting applications.
v0.27.5
- Make the child handling more robust in the face of exceptions.
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.
Developer 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.