mysql server by name instead of IP for cluster

My long term goals include offloading the mysql server onto it’s own cluster. From what I can tell, interworx/nodeworx use an IP address for user databases when clustered and directs the users to use that IP address as well. Mysql does not care where it is and if there is some way to change how interworx interacts with the user databases from IP to name based, it would make it easy to move the databases off of the server and still have interworx manage them.

I am not suggesting moving the interworx database, just the user databases. I already have my users using name based and I am translating that into the IP address that interworx uses. I just need interworx to change now :slight_smile:

With InterWorx clustering the Cluster Manager serves as the database server and we currently don’t have the ability to do this separately. The CM manages all MySQL queries, and MySQL is not load balanced.

It’s theoretically possible to create an external database server and create those databases – all configuration files must refferene the IP of the CM/database server, not ‘localhost’ – BUT there is no way to make InterWorx manage those databases. You would need to manually create/delete/edit each user and database.

It is actually easier than that. The mysql server does not care if it is local or not. You can run the same commands remotely as you do locally. My database answers to zz-mysql1 which is also the same IP address as the cluster manager. All of the web sites on my interworx servers use the name based and work correctly. It is just interworx that requires the IP address. If you could program interworx to use the name instead of IP address, the whole thing could be transparent to interworx.

You are already doing what is needed to manage databases remotely. The nodes can create and delete databases on the cluster manager based off of the IP address. If you were to change the IP address to name based, it would be the same thing and you could transparently move the database off of the cluster manager as well.

The point though is that if you do this InterWorx would not manage them if they are not on the CM and that is what you originally asked about :slight_smile:

Also what I was refering to was the config file of a php script you installed (e.g. phpBB) typically has a line for DB host which defaults to “localhost” and with an InterWorx cluster this MUST manage the actual IP of the database server.

[QUOTE=peterz;12384]It is actually easier than that. The mysql server does not care if it is local or not. You can run the same commands remotely as you do locally. My database answers to zz-mysql1 which is also the same IP address as the cluster manager. All of the web sites on my interworx servers use the name based and work correctly. It is just interworx that requires the IP address. If you could program interworx to use the name instead of IP address, the whole thing could be transparent to interworx.

You are already doing what is needed to manage databases remotely. The nodes can create and delete databases on the cluster manager based off of the IP address. If you were to change the IP address to name based, it would be the same thing and you could transparently move the database off of the cluster manager as well.[/QUOTE]

Hi,

I completly agree with this !

Today we also use the cluster and we also plan to create a MySQL cluster elsewhere than on the cluster manager. Indeed, today our cluster manager runs ONLY mysql and NFS and the load average is very very high. We’ll need, in a short time, to create a mysql replicatiobn or cluster. (I have already writen few posts about this)

I think it has been a good idea for Interworx to became the first panel manging a cluster, but Interworx has to continue this way and to allows their clients to have a “real and usable” cluster. What I mean by real and usable is a cluster that allow you to have ALL your architecture based on the cluster/load balancing !

To achieve this you’ll have a day or an other to implement a mysql cluster

I really Hope Interworx will go this way, and seriously, one year ago, when we began speak about V3 I thought this release would have allow this

So, I just hope that Interworx will choose this route :wink:

Pascal

[QUOTE=peterz;12349]My long term goals include offloading the mysql server onto it’s own cluster. From what I can tell, interworx/nodeworx use an IP address for user databases when clustered and directs the users to use that IP address as well. Mysql does not care where it is and if there is some way to change how interworx interacts with the user databases from IP to name based, it would make it easy to move the databases off of the server and still have interworx manage them.

I am not suggesting moving the interworx database, just the user databases. I already have my users using name based and I am translating that into the IP address that interworx uses. I just need interworx to change now :)[/QUOTE]

You have to do few things :

  • Be sure that in MySQL database (user and host) you have an entry with all the IP of the nodes + localhost or % (less secure)
  • On every nodes, create in /etc/hosts an entry for your mysql server hostname (192.168.1.5 mysql-server)
  • In the language file entry Change the entry that speak about setting the IP adress in their script to your users and replace the IP give here by this hostname (we didn’t done this, we have just added this : “'you can enter this hostname mysql-server in your script rather than this IP”)
  • Tell ALL your user to enter in their scripts this hostname (mysql-server for example)

It is what we do and we haven’t any kind of problem

Pascal