Wez Furlong d3ba5ccd2c connection_limit: implement using leases
To support distributed connection limits, adjust the way that
connection limits are handled.

Previously, we'd do a simple in-memory comparison with the limit to
guide whether we had reached the limit.

In a distributed/clustered scenario we need a shared understanding
of the state of the connections, so we're moving to a lease-based
model.

Each connection is associated with a UUID.
Each egress path maintains a set of connections and their UUIDs.

When attempting to make a new connection, we can only proceed if the
number of connections associated with an egress path is below the limit.

When a connection is closed, its UUID is removed from the associated
set.

To handle crashes, kills and netsplits, the path -> uuid association is
also accompanied by an expiration time beyond which it can be assumed
that the lease is no longer valid.  We compute that time based on the
worst case timeout value for a single message send on the given pathway.
Each time a connection is ready to obtain a new message, it will try
to extend its lease by that same duration.

This commit introduces these concepts and models them using an in-memory
store for the single node case, and using redis for the cluster case.
When your policy enables `kumo.configure_redis_throttles`, that same
redis configuration is used to back to the connection limiting
functionality.

refs: https://github.com/KumoCorp/kumomta/issues/41
2023-06-30 15:39:09 -07:00
2023-03-06 07:53:27 -07:00
2023-02-10 16:44:10 -07:00
2023-06-21 18:10:15 -07:00
2023-02-21 21:18:49 -07:00
2023-02-21 21:18:49 -07:00
2023-03-09 20:56:02 -07:00
2023-06-22 13:50:51 -07:00
2023-02-15 06:51:59 -07:00

KumoMTA

This repository holds the source code to KumoMTA, a modern Message Transfer Agent designed for large scale sending environments.

You can learn more about why it exists here.

Documentation

You can learn more about KumoMTA from the Documentation

Community

Real-time discussion is available on Our Discord.

Our Forum is better for long-form questions and discussions.

Developers

If you're interesting in contributing/extending KumoMTA, take a look at DEVELOPERS.md.

Getting Help

Please see How to Report Bugs or Get Help

S
Description
The first Open-Source high-performance MTA developed from the ground-up for high-volume email sending environments.
Readme
37 MiB
Languages
Rust 91.8%
Lua 6.3%
Python 0.9%
Shell 0.8%
JavaScript 0.1%