0

I'm running MySQL servers load balanced via HAProxy. But I need to perform some action whenever a node (MySQL) goes down or comes up, like we do in PgPool-II.

Example:

When ever MySQL-1 goes down, I also want to shutdown my WebServer-1. (STONITH like) In PgPool-II for PostgreSQL, I can do this. I'm unaware, if there are similar tools for MySQL.

Is this possible in HAProxy itself:

Say, when my DB-1 goes down, route the web server traffic, to WebServer-2.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Shan
  • 2,141
  • 2
  • 17
  • 32

1 Answers1

0

MySQL has quite an extensive support for replication, high availability and sharding. Your question is not very clear to me but here are a few things you could try reading:

  1. For failover, MySQL provides a python script called mysqlfailover which is shipped as part of MySQL utilities.
  2. For sharding and high availability you could try out MySQL Fabric. MySQL Fabric is a relatively new product so expect it to not provide all kinds of fancy sophisticated sharding schemes in theory but it is stable enough for you to trust it with what it provides.

By the way both of them are open source so you could tweak it to suit your need!

Shiv
  • 471
  • 4
  • 8