1

Topic: Need advice for backend choice, and scalability

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
==== I am new to this community, I hope this is the right place to ask for advice:

I am considering iRedMail for my new community server. I will start relatively small (10,000 Users), and it should be able to grow to a few million users. We are estimating that most users will access their email through mobile devices, mostly Imap, and some POP3, maybe 10% through webmail.

I need to start with one server (thinking about quad core, 16G mem, 4TB SATA RAID (1, 5, 10 need advice here) and CentOs (also need advice). This should be sufficient for up to 5,000 users or more, then can add mem and storage on the same server.

Later depending on the load, I will add storage or more servers (how?).

Big question: What kind of backend should be appropriate? I don't have and specific requirements for connectivity, this is exclusively email service. The only difference will be a self registration module, for users to create their own email accounts (will be developed or adopted).

How can I grow the userbase just by adding servers without interrupting the service (scalability)?

Any advice is welcome. Thank you in advance.

Omer

2

Re: Need advice for backend choice, and scalability

okomili wrote:

I will start relatively small (10,000 Users), and it should be able to grow to a few million users.

Cool, grow so fast.

*) Daily traffic matters. not number of accounts.

okomili wrote:

We are estimating that most users will access their email through mobile devices, mostly Imap, and some POP3, maybe 10% through webmail.

*) Webmail accesses mailboxes through IMAP protocol.
*) So the performance bottleneck MAY be IMAP/POP3 service, provided by software Dovecot. You should tune it to serve more users concurrently. Dovecot official web site: http://www.dovecot.org/

okomili wrote:

I need to start with one server (thinking about quad core, 16G mem, 4TB SATA RAID (1, 5, 10 need advice here) and CentOs (also need advice).

*) RAID 10 is better than 1, 5.
*) Use SAS for better disk I/O if possible.
*) CentOS is ok. And if you choose CentOS, please use CentOS 6.x, NOT CentOS 5.x.

P.S. Top 3 Linux distributions used by iRedMail users are: CentOS 6.x (#1), Ubuntu 12.04 LTS (#2), Debian 6 (#3).

okomili wrote:

Later depending on the load, I will add storage or more servers (how?).

Well, no easy solution yet. It depends on your existing server configurations.

*) The (possible) best solution is load-balance cluster, and it must support plugging and removing server nodes anytime you want. But it's not easy to achieve this.

*) DNS round-robin is an easy solution (part of above item), but the key in this load-balance cluster is how to make all server nodes can access the same mailboxes. (user login on each one should have all his/her emails, not just login to server node1, or server node2.)

*) A shared-storage should solve above one, but the share-storage itself will become a potential bottleneck (most disk I/O goes there).

okomili wrote:

Big question: What kind of backend should be appropriate? I don't have and specific requirements for connectivity, this is exclusively email service. The only difference will be a self registration module, for users to create their own email accounts (will be developed or adopted).

*) Maybe MySQL or PostgreSQL backend is better, you can setup MySQL/PostgreSQL replication to sync all mail accounts and data. OpenLDAP replication is easy too, but OpenLDAP stores only mail accounts, you still have to setup MySQL/PostgreSQL replication to sync addition application data. The principle is choosing the one you're familiar with.

*) With MySQL backend, there's a third-party self-resgistration plugin available. It should work with PostgreSQL, but i didn't test it. Use it on your own: http://www.iredmail.org/forum/topic4570 … ounts.html