Re: Nginx configuration for imap

2010-03-22 Thread Naresh V
On 23 March 2010 03:18, Bron Gondwana wrote: > On Mon, Mar 22, 2010 at 01:52:55PM +, Naresh V wrote: >> Bron Gondwana fastmail.fm> writes: >> >> [...] >> > >> > Why does the auth fail on the backend server?  It never should.  If it does >> > that means you've screwed up pretty badly.  You can

Re: Nginx configuration for imap

2010-03-22 Thread Bron Gondwana
On Mon, Mar 22, 2010 at 01:52:55PM +, Naresh V wrote: > Bron Gondwana fastmail.fm> writes: > > [...] > > > > Why does the auth fail on the backend server? It never should. If it does > > that means you've screwed up pretty badly. You can give the failure from > > nginx by just passing an

Re: Nginx configuration for imap

2010-03-22 Thread Naresh V
Bron Gondwana fastmail.fm> writes: [...] > > Why does the auth fail on the backend server? It never should. If it does > that means you've screwed up pretty badly. You can give the failure from > nginx by just passing an Auth-Status header. > It fails on the backend server when the password

Re: Nginx configuration for imap

2010-03-18 Thread Robert Banz
On Thu, Mar 18, 2010 at 3:49 AM, ram wrote: > > On Wed, 2010-03-17 at 22:45 -0700, Robert Banz wrote: > > > > > > memcached would certainly be fast, but what sort of authentication > > rate are you talking about here. My bet is that you've got other bits > > of system, such as the authentication

Re: Nginx configuration for imap

2010-03-18 Thread Bron Gondwana
On Thu, Mar 18, 2010 at 04:19:37PM +0530, ram wrote: > One more issue with nginx 0.8.34 is that when auth-fails on the real > server the nginx returns "BAD: internal server error" > The email clients are not able to interpret this error. > > Can I configure nginx to pass on the actual message f

Re: Nginx configuration for imap

2010-03-18 Thread ram
On Wed, 2010-03-17 at 22:45 -0700, Robert Banz wrote: > > > memcached would certainly be fast, but what sort of authentication > rate are you talking about here. My bet is that you've got other bits > of system, such as the authentication validation with the target IMAP > server, that will be mo

Re: Nginx configuration for imap

2010-03-17 Thread Robert Banz
memcached would certainly be fast, but what sort of authentication rate are you talking about here. My bet is that you've got other bits of system, such as the authentication validation with the target IMAP server, that will be more of a dominant term when it comes to the performance of your system

Re: Nginx configuration for imap

2010-03-17 Thread Robert Mueller
> But I thought a memcache lookup will be much more inexpenisve than > connecting to a mysql db to do lookup for every cyrus connection Probably slightly. But what happens if the value isn't in memcached? Where do you get the value from? Anyway, it's still WAY better than doing: > > > $user['u

Re: Nginx configuration for imap

2010-03-17 Thread ram
On Thu, 2010-03-18 at 14:36 +1100, Robert Mueller wrote: > > > $user['user1'] = 10.1.1.1; > > $user['user2'] = 10.1.1.2; > > > > $user[user15000]=10.1.1.1; > > For 15k users this method becomes very heavy. There are too many httpd > > processes running that suck the resources on the machine

Re: Nginx configuration for imap

2010-03-17 Thread Robert Mueller
> $user['user1'] = 10.1.1.1; > $user['user2'] = 10.1.1.2; > > $user[user15000]=10.1.1.1; > For 15k users this method becomes very heavy. There are too many httpd > processes running that suck the resources on the machine. I want to > store the userlist in a memcache and look it up through ng

OT: Nginx configuration for imap

2010-03-17 Thread ram
I am using ngnix as a Load balancer for two imap servers. Currently the nginx calls an apache php script that determines if the user is on imap1 or imap2 by looking up a plain text file. which contains entries like $user['user1'] = 10.1.1.1; $user['user2'] = 10.1.1.2; $user[user15000]=10.1.1