Re: [exim] EXIM clusters and rate limiting

2021-04-24 Thread Brad King via Exim-users
Thanks guys, looks like a bit more R&D for me.

Cheers,

Brad

On Fri, 23 Apr 2021, 06:49 Heiko Schlittermann via Exim-users, <
exim-users@exim.org> wrote:

> Hi,
>
> Brad King via Exim-users  (Mi 21 Apr 2021 23:33:20
> CEST):
> > What I am trying to find out specifically is about rate limiting. I
> > need the ability to apply different classes of service for different
> > IP addresses. That is, they will have different rate limits and
> > connection limits.
> >
> > I understand this is quite easy on a single server, but how do I
> > configure this on a cluster?
>
> Unfortunately currently Exim running on one host can't share information
> with an instance running on another host, out of the box.
>
> However: you can use a shared FS for the database files (hint files),
> where Exim stores the rates, and other hits. But I assume you'll run
> into locking issues quite fast.
>
> > For example, if IP 1.1.1.1 was assigned 2000 messages/hour. I have 10
> > EXIM servers behind my VIP.. How do I ensure that 1.1.1.1 can only
> > send max 2000 messages/hour? It would be possible, on a 'per server'
> > basis that they may make a connection to multiple EXIM servers within
> > the hour which would give them a possible volume of 2
> > messages/hour(2000x10 EXIM servers)
>
> For most cases, if your loadbalancer balances the connections quite
> evenly, you can apply 1/nth of the rate per instance. That's by far not
> perfect, but should do the job.
>
> Alternativly you can start hacking Exim and provide memcache, redis,
> whatever for the hint databases. (It shouldn't be too hard.) If you
> can't do the hacking on your own, try asking if there is anybody you can
> pay for it.
>
> Best regards from Dresden/Germany
> Viele Grüße aus Dresden
> Heiko Schlittermann
> --
>  SCHLITTERMANN.de  internet & unix support -
>  Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>  gnupg encrypted messages are welcome --- key ID: F69376CE -
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] EXIM clusters and rate limiting

2021-04-22 Thread Heiko Schlittermann via Exim-users
Hi,

Brad King via Exim-users  (Mi 21 Apr 2021 23:33:20 CEST):
> What I am trying to find out specifically is about rate limiting. I
> need the ability to apply different classes of service for different
> IP addresses. That is, they will have different rate limits and
> connection limits.
> 
> I understand this is quite easy on a single server, but how do I
> configure this on a cluster?

Unfortunately currently Exim running on one host can't share information
with an instance running on another host, out of the box.

However: you can use a shared FS for the database files (hint files),
where Exim stores the rates, and other hits. But I assume you'll run
into locking issues quite fast.

> For example, if IP 1.1.1.1 was assigned 2000 messages/hour. I have 10
> EXIM servers behind my VIP.. How do I ensure that 1.1.1.1 can only
> send max 2000 messages/hour? It would be possible, on a 'per server'
> basis that they may make a connection to multiple EXIM servers within
> the hour which would give them a possible volume of 2
> messages/hour(2000x10 EXIM servers)

For most cases, if your loadbalancer balances the connections quite
evenly, you can apply 1/nth of the rate per instance. That's by far not
perfect, but should do the job.

Alternativly you can start hacking Exim and provide memcache, redis,
whatever for the hint databases. (It shouldn't be too hard.) If you
can't do the hacking on your own, try asking if there is anybody you can
pay for it.

Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
 SCHLITTERMANN.de  internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --- key ID: F69376CE -


signature.asc
Description: PGP signature
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] EXIM clusters and rate limiting

2021-04-22 Thread Evgeniy Berdnikov via Exim-users
On Thu, Apr 22, 2021 at 07:33:20AM +1000, Brad King via Exim-users wrote:
> I guess I am asking is there a way for each EXIM server to know what
> the others are doing so as to make decisions on connections and rate
> limits?

 Exim can communicate with outer world, for example, via ${readsocket..}
 or ${run..} functions, database lookups (of many types) and so on.
 Data may be passed in and out, used it in ACLs, routers, transports.
 So you can effectively manage your servers with external software, but
 no clusterization tools are shipped out of the box.
-- 
 Eugene Berdnikov

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/