Ispconfig with session aware apache and mysql ndb-cluster

Discussion in 'General' started by honse33, Aug 6, 2014.

  1. honse33

    honse33 New Member

    Hey guys,

    as I'm getting a lot of new websites and traffic and stuff, so I am considering if I should stock up the server. My main aspects are high availabilty and data redundancy.

    My thoughts at the moment:
    3 Machines:
    - 1x small ndb management system (mysql cluster master)
    - 2x full systems (apache, mail, mysql, ftp) (each of them ndb/mysql slave).
    The ndb-mgmt system will be hidden from public. Both full systems will be listed in the dns as roundrobin dns.

    The main projects on the server are a big community project (forum, with user blogs), and a pretty big international shop system. Besides that, there are some hostings of rather small websites and services (like irc bouncer).
    As the projects grow faster as we have expected it, high availabilty is a must.

    One main goal has to be, that especially the usage of the shop system is as transparent as it can be. I mean like, I visit the site, put things in my cart - server 1 has a high load, server 2 triggers - i can checkout my cart without noticing anything that I finished my shopping on a different server.

    I have some guys that need to access the server as well for adding mail accounts, domainstuff, etc - but they havent got any experience with the shell, so I need a web-gui for them. At the moment plesk is running, but we dont want to use it any further. So with the upgrade/stocking up I want to change the whole system to ISPconfig3.

    So my questions are: is this setup ok? can I use ISPconfig for my intention? How should I install everything? Mysql NDB at first, than install ISPconfig? A Master install on the ndb-mgmt, only slave installations on the full systems? Server2 should be a total copy of server1 - is that possible by ispconfig, or do I have to manually do changes on both systems seperately?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I know that some usres use ispconfig with percona mysql cluster successfully. If I remember, ndb is a bit special when it comes to supported mysql database tabe types? ispconfig uses by default for its own databases myisam, by changing myisam to innodb in the mysql database dump upfront of installation, you can use innodb as well. It might work with the ndb cluster table type as well, But I havent testet that.
  3. honse33

    honse33 New Member

    I made some VMs with Debian and tried to test the whole thing. The problem with the ndb-cluster is, that innodb tabled won't replicate on all nodes. If I change the sqldump to ndbclusterengine some of the CREATEs and INSERTs fail.

    In the next days I'll give mariadb and percona db a try. Both are capable of syncing innodb tables quite instant (as long as one can trust product descriptions...). mariadb should replicate myisam since the newest version.

    I have some questions about ISPconfig:
    As the loadbalancers infront of the nodes work pretty good, I now need a setup of ISPconfig on the nodes. It would be great if I call ISPconfig by using the loadbalanced IP to reach one of two ISPconfig-setups. If I now create some mailboxes, some clients and stuff, it should replicate instant on the second system.

    For better understanding, here is a quick listing of steps that I meant:
    - $admin goes to the load balanced IP:
    - loadbalancer fordwards it to node1, e.g.
    - $admin logs in at node1, creates clients (as in shellusers for suPHP/fcgi), websites, mailboxes and stuff
    - node2 should catch all changes of node1 ASAP
    - $client1 can now use e.g. ftp by the loadbalanced IP and uploads stuff to one node.

    Accessing ISPconfig on both nodes can be optional. It would be ok if we access ISPconfig on node one directly, but settings and data need to sync nonetheless.

    BTW: As I'm german, we might switch to german if you want :p
  4. honse33

    honse33 New Member

    So I made my tests with mariadb and galera. The first tests work pretty good, except of one thing:

    The users are not replicated on all nodes. I created a client, website, and ftp user. On one node it creates all the paths and users correctly. The folder structure gets replicated on all nodes by glusterfs.

    [email protected]:~# id web3
    uid=10003(web3) gid=10003(client3) Gruppen=10003(client3),5002(sshusers)
    [email protected]:/var/www/ ls -alh
    insgesamt 48K
    drwx--x--x 3 web3 client3 4,0K Aug 20 11:25 .
    drwxr-xr-x 9 root root    4,0K Aug 20 11:25 ..
    -rwxr-xr-- 1 web3 client3 7,2K Aug 20 11:25 favicon.ico
    -rwxr-xr-- 1 web3 client3   26 Aug 20 11:25 .htaccess
    -rwxr-xr-- 1 web3 client3 1,9K Aug 20 11:25 index.html
    -rwxr-xr-- 1 web3 client3   14 Aug 20 11:25 robots.txt
    drwxr-xr-x 2 root root    4,0K Aug 20 11:25 stats
    [email protected]:~# id web3
    id: web3: Einen solchen Benutzer gibt es nicht (No user found)
    [email protected]:/var/www/ ls -alh
    insgesamt 48K
    drwx--x--x 3 10003 10003 4,0K Aug 20 11:25 .
    drwxr-xr-x 9 root  root  4,0K Aug 20 11:25 ..
    -rwxr-xr-- 1 10003 10003 7,2K Aug 20 11:25 favicon.ico
    -rwxr-xr-- 1 10003 10003   26 Aug 20 11:25 .htaccess
    -rwxr-xr-- 1 10003 10003 1,9K Aug 20 11:25 index.html
    -rwxr-xr-- 1 10003 10003   14 Aug 20 11:25 robots.txt
    drwxr-xr-x 2 root  root  4,0K Aug 20 11:25 stats
    The option "Linux Userid mit webid verknüpfen" (combine linux UID with webid) is checked on both nodes.

    What am I missing?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The most commo misatke is that the hostnames of all nodes were not setup on all nodes in /etc/hosts before ispconfig is installed, this will cause the cluster to fail later as the slaves cant connect to the master anymore. See here for debug instructions:
  6. honse33

    honse33 New Member

    There seemed to be a replication error causing confusion. I then edited the master-slave db-info in server/lib/

    Now it the whole project works like a charm! Thank you for your help!

Share This Page