0

I'm trying mysql cluster to use in a project for our customer.

The configuration I setted up is the following:

**Hardware S.O. equipment**
Server1 - S.O. Windows 2008 R2 64bit 
Server2 - S.O. Windows 2008 R2 64bit 
Client1 - S.O. Windows 7 64bit 
Client2 - S.O. Windows 7 64bit 

UserClient2 - S.O. Windows 7 64bit 
UserClient3 - S.O. Windows 7 64bit 
UserClient4 - S.O. Windows 7 64bit 
UserClient5 - S.O. Windows 7 64bit 
UserClientXX - S.O. Windows 7 64bit (where XX is less than 15) 

My Sql Cluster Configuration Server1 - act as cluster data node 1 Server2 - act as cluster data node 2 Server1 - act as mysql node 1 (from now MYSQL-D1) Server2 - act as mysql node 2 (from now MYSQL-D2) Client1 - act as mysql cluster management node 1 Client2 - act as mysql cluster management node 2

Client application configuration The following clients (from now CLIENTAPP): Client1, Client2, UserClient2, .., UserClientXX have a Microsoft .Net application that interact with mysql cluster database.

After a while the My sql cluster configuration appears to work correctly and any of CLIENTAPP it's able to connect to MYSQL-D1 or MYSQL-D2 (this is possibile by changing the connection string of .NET client application and pointing to IP of MYSQL-D1 or to the IP of MYSQL-D2).

In a perfect world CLIENTAPP automatically it's able to connect to the right server (MYSQL-D1 or MYSQL-D2), pratically: - if MYSQL-D1 it's down CLIENTAPP connect to MYSQL-D2 - if MYSQL-D2 it's down CLIENTAPP connect to MYSQL-D1

How .NET client application can interact with mysql cluster?

The best solutions I have found for my scenario are the followings: 1. use mysql proxy but this is in a alpha stage and I can't use it in production enviroment 2. install cluster data node on each CLIENTAPP 3. use a connection string that support multiple servers (I don't know if it's supported by mysql .NET connector) 4. rewrite my application to interact with both MYSQL-DX node (what I want to avoid)

Is there a right solutions? Which one is the best one?

Thank you

1 Answer 1

0

Your configuration looks more like a multi-master than a cluster : in a cluster, data nodes and clients (usually mysql servers) connect to the management node, who handle nodes arrivals and departures.

Then you just connect to any of your mysql servers and issues sql statements .. who are processed by the data nodes for tables in NDBCLUSTER. But that way, you don't profit of the NDBApi power. Just its load balancing capabilities.

Maybe should you have a look at multimaster mysql replication, DRDB or percona xtradb cluster.

Unfortunatly, it doesn't seem to have much load balancing options for the mysql c# but maybe can you code a wrapper around Mysql connection object one.

On the side node note, there are very powerfull drivers for Java and C++ who allow to connect directly to the data nodes, bypassing sql for common CRUD operations, and having a huge performance gain. I guess it's time for the community to create a .Net NDBCluster driver

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .