I have an idea for modifying the mailstore for imap for added scalability and failover. It would use web servers to store the actual files rather than the standard file system.
I'm hoping to generate some interest and knock this out. I think it should be a pretty simple change and give HUGE gains. It would def be a bit slower to access the message file via http rather than local filesystem, but should be pretty fast and gives simple solution for replication/failover/HA on the open source version of zimbra.
It would work something like below.
- Modify "com.zimbra.cs.store.StoreManager" so that it stores message file via post to web server. It should post to two different servers, for failover.
- The two urls to the file are stored in the database with the messageId.
- When the imap server needs to "get" a message file, it will requrest it from one of the urls listed in the database. If one fails it will failover to the other.
- If a server is low on storage, just add another plain old web server. It would just need a script to receive uploads via post. Then add the server to the list of available web storage servers
- Mysql and Ldap are replicated to a second server for application failover. Storage fails over using the above solution.
I'm going to start digging through the code this week to see how doable this is. Let me know if you have any interest in helping out. I could def use a hand from someone who has worked with the Zimbra code.