This query is about the optimal arrangement of IMAP proxies between IMAP 
webmail clients and "real IMAP servers" which use a shared NAS/SAN for storage 
of mail.

The Problem
~~~~~~~~~
The problem is caused by the fact that IMAP webmail clients are heavy on 
backend IMAP servers. IMAP webmail clients, unlike some native clients, do not 
persist IMAP sessions, and so the result is that every user "click" leads to a 
whole open-do-close IMAP session. Ideally, a persistent IMAP session would be 
opened when a user logs in, and is re-used during the webmail users activity, 
and is closed when the user logs out. 

  (user) ----- [webmail] -- -- -- [IMAP server]

Solution
~~~~~~
The solution is often seen to lie in IMAP proxies which maintain a session to 
the real IMAP servers for a given timeout period. 

  (user) ----- [webmail] -- -- -- [IMAP Proxy] -------- [IMAP server]

Problem with Solution
~~~~~~~~~~~~~~~~
The problems arise when IMAP proxies are used in architectures which use load 
balancers and load-balanced clusters. 

Imagine a group of real IMAP servers, which use a SAN shared storage for the 
mail data, headed by a load balancer which distributes IMAP connections across 
these IMAP servers. Note that additional load-balancer mechanisms such as 
"stickiness" are not required as IMAP connections are stateful unlike common 
HTTP requests. 

Now if a set of IMAP proxies is placed behind the load-balancers then it is 
possible that many IMAP sessions generated by a users webmail session can end 
up load balanced to many IMAP proxies. This is not good. It means that *one* 
users's webmail session has been sprayed across *multiple* IMAP proxies and 
each of these will persist a session with the real IMAP servers (for at least 
the timeout period). 

  (user) ----- [webmail] -- -- -- <lb> -- -- -- [IMAP Proxy] -------- [IMAP 
server]
                                      \-- -- -- [IMAP Proxy] -------- [IMAP 
server]
                                      \-- -- -- [IMAP Proxy] -------- [IMAP 
server]

So we could place the IMAP proxies closer to the webmail servers - before the 
load balancers. This means that each webmail server must be preconfigured to 
talk to a single IMAP proxy. This way the persisted sessions survive through 
the load-balancers and only one session is maintained to the backend real IMAP 
servers. However, the problem with this is that there is reduced resilience - 
if the proxy fails then no users can use that particular webmail server. 

  (user) ----- [webmail] -- -- -- [IMAP Proxy] -------- <lb> ------ [IMAP 
server]

Constraint
~~~~~~~~
An answer is to place the IMAP proxy co-resident with the webmail application, 
effectively giving the webmail application a persisting capability. However 
this option is not available in this instance as the webmail servers cannot be 
modified.


What are people's opinions here? Are there any magic load-balancing mechanisms 
that can be used to good effect here? The load-balancers are Foundry ServerIron 
machines.





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Courier-imap mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to