Auteur: Eli Date: À: exim-users, 'Dean Brooks' Sujet: RE: [Exim] MySQL persistant?
Dean Brooks wrote: > Hi,
>
> We are running Exim 4.30, and are considering using MySQL lookups
> in our Exim config in various spots.
>
> However, we run a fairly high volume mail server and I am concerned
> that MySQL database connections will have to be rebuilt for each new
> incoming message.
>
> Does Exim set up the MySQL connection in the parent listener process
> (-bd switch), and then pass on the open connection to all of its
> forked children, or does a new connection have to be built for
> each child that needs to do a query?
To my knowledge, no it doesn't. However it does cache connections for the
same process, and I believe it even caches the last lookup in case it's used
again.
> Performance is really the issue here, and am concerned about
> the overhead on our MySQL server of dealing with thousands of
> new connections per minute.
If you plan on having a mail server take in 1000+ connections concurrently,
might I suggest looking towards setting up a cluster of email servers and
putting them behind a load balancer. On each mail server, have them run a
local MySQL server which is set to slave off of one master server. The
master server gets new records put in to it by admin people adding new
accounts or what have you, and serves up connections only to the pool of
mail servers. Each mail server can then easily handle quite a few
connections which will query the local db, not impacting any of the other
servers. If it gets sluggish, depending on how your load balancer is
configured, you shouldn't notice a thing :)