configuring MySql cluster failover using the .Net connector
I've got an ASP.Net website which is running on a load-balanced environment (2 Windows servers). It connects to a clustered MySql database which is running on two linux servers running Ubuntu.
We've been running into a number of errors while trying to route the MySql data through our JetNexus load-balancer, so I'm trying to find out if there's a way of configuring the individual web-servers with some sort of automatic database server failover detection. If I were using MS-SQL, I'd configure the connection string using the "Failover partner" parameter, but MySql doesn't support that. Is there anything else like that out there, or is there an alternate solution to this issue?
Extra info:
I'm using MySql connector 6.4.3, ASP.Net 4.0, MVC 3.0, the database is running MySql cluster 7.1.15a, cluster_server 5.1
I've tried specifying multiple MySql hosts in the connection file (using "server=192.168.0.1 & 192.168.0.2") and while this appears to work it doesn't automatically detect the failover and crashes as soon as I take out one of the databases.
I've come across something called "MySQL Proxy" which looks like it should fit the bill, but we have a hardware load-balancer so I'm going to spend time trying to get that working properly rather than implementing an extra software proxy.
The errors we are getting are "System.IO.EndOfStreamException: Attempted to read past the en开发者_StackOverflow社区d of the stream.". This happens intermittently when we run MySql through the load-balancer. This is a separate issue and may not be related to the question but I've included it here for completeness.
Thanks for reading !
I do not fully understand MySQL Cluster (Never used it) but I have suggestion:
Is it possible to put the cluster servers under a single ip? So the Ubuntu or MySQL Cluster load balance handles the fail-over?
精彩评论