[Dovecot] Blocking auth services
Peter Mogensen
apm at one.com
Mon Aug 8 15:04:17 EEST 2011
Hi,
I'm writing an passdb/userdb plugin to authenticate against an external
daemon listening on a UNIX socket.
The connection to the daemon is 1 request at a time and thus blocking
(unlike passdb-ldap), but the daemon is preforking, so it can handle
more connections at a time.
I read from the Wiki:
http://wiki2.dovecot.org/Design/AuthProcess
* "The authentication may begin new authentication requests even before
the existing ones are finished. ", and
* "If the passdb uses connections to external services, it's preferred
that they use non-blocking connections. Dovecot does this whenever
possible (PostgreSQL and LDAP for example). If it's not possible, set
blocking = TRUE. "
... which tells me to set the module as blocking and let more auth
worker processes do the work - creating 1 daemon process for each auth
worker process, I guess.
But I also have the option, to let the passdb/userdb plugin maintain a
pools of used/idle connections to the daemon and just pick a idle
connection and moving it to the used pool on each auth_request.
Which would save me the auth worker processes.
Is there a preferred dovecot way?
/Peter
More information about the dovecot
mailing list