My experience with MultiServer

Discussion in 'General' started by dghvoip, Apr 24, 2012.

  1. dghvoip

    dghvoip New Member

    Hi All,

    I just wanted to share my experience and tell you about my SPC3 setup on my machines as distributed servers.

    I run two identical physical servers with XEN Dom0 and some LVM based Debian Squeeze instances all of them the same setup, I have two load balancers with Keepalived and HAproxy listening for HTTP, SMTP, SMTPs, IMAP and all of the services which are being managed by ISPC 3. I followed the great guide at altho I made some modifications because I wanted a central database for the dbispconfig DB, so I run a separate server (w/o ISPC) and all of the DBs reside there.

    it looks like this, names are self explanatory, I hope you get it.

    isplb1 (XEN DomU)
    isplb2 (XEN DomU)
    ispweb1 (XEN DomU) \ /var/www  is mounted via GlusterFS
    ispweb2 (XEN DomU) /
    ispmx1 (XEN DomU) \ /var/vmail is mounted via GlusterFS
    ispmx2 (XEN DomU) /
    ispdb1 (XEN DomU) \ This two servers are on a master-naster
    ispdb2 (XEN DomU) / setup.
    ispns1 (XEN DomU)
    ispns2 (XEN DomU)[/B]
    All of these with the idea of easy escalability and server in different geographical location in mind.

    I installed the ISPC GUI as per the howto, and then the MX server, then DNS server a MySQL server for customers DBs; afterwards I just made a snapshot of all of the machines and dd'ed them and transferred them to the 2nd server where I dd'ed them back to LVs, I went on and changed IPs and now I have redundant services for _all_ of my ISPC managed services.

    MySQL servers are on a master to master replication schema and they're load balanced with HAProxy, so Joomla and all stuff accessing the DBs is connected to the front-end and requests are balanced between servers on the farm.

    I had to tweak the setup to make this work, for example when I was installing ISPC on each server I used the dame password for all of the ISPC instances so that I could duplicate the machines without having to reinstall ISPC on each server, this also helped me get rid of the "relay access denied" error from postfix, as I've discovered that ISPC ties the name of the server to the username and such, so when I tried to send/receive emails on the duplicated machine I got those errors.

    For dovecot I had to change the dovecot.conf to use a unique username I created manually to access the dbispconfig DB and get rid of the MySQL Access denied errors.

    Web content, MySQL DBS (customer's), Apache and Postfix config files are being mounted via GlusterFS shares on a NAS server, so that duplicated machines can load identical settings without having to keep scp'ing thwm between machines.

    It's working quite nicely now with the exception of mailing lists and whenever I cerate a new client as ISPC creates an unix user account for each client, I have to manually copy passwd and group files to keep web servers in sync and avoid Apache start up errors.

    That's basically it, when I grow up and have a job, I want to run a cosy Web Hosting company and offer those services, also adding XEN VMs, but that's out of the scope of this post/forum.

    Hope you find it interesting.

    That's a bit of what you can do with ISPConfig and asome imagination.

    Sky is the limit.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks yor your post! :)

    ISPConfig does not create a new Linux user for each client. Clients are a virtual construct that exists only in the mysql database to group website and organize permissions. ISPConfig creates a new Linux system user for each website and thats required to run websites safely so that e.g. php scripts of different sites dont run under the same linux uid.

    The problem that you have is caused by a misconfiguration of your system, you missed to enable mirroring in ispconfig. If mirroring in ispconfig is enabled, then ispconfig will create the shell users on all webservers automatically. Please take a look at this guide, it explains the setup and required settings in ISPConfig:

    It covers also mirroed mail setup etc. and can be used for more then 2 servers as well.

Share This Page