Forum Discussion

rpalacios_79340's avatar
rpalacios_79340
Icon for Altostratus rankAltostratus
Mar 26, 2010

Load Balancing Method

Hello Guys,

 

 

I've been presented with an odd request at work. Let me start of by providing some basic description of our environment. We have two datacenters. Our primary DC is here in Santa Ana and our disaster recovery site is in Dallas.

 

 

Request:

 

 

The request I have to put two mysql servers behind the F5 in both DC's. That is simple enough, right? The catch is that what they would like to do is have the primary mysql server (Santa Ana) get all of the traffic unless it's unavailable and both sites would be configured so that the same mysql server gets all of the traffic from both sites.

 

 

I think what they are looking for is multi-site processing. They actually don't want it to do load balance, they want to use it to force both sites to use the same mysql server but still be able to failover if the sql server at one site fails.

 

 

Question:

 

 

The question I have is besides having 1 member of the mysql pool disabled at each site, is there another way to accomplish this request? iRules?

 

 

-rp

 

7 Replies

  • Hi RP,

     

    I think this is certainly possible. However, it's going to take 2 types of equipment to accomplish it. First you need a GTM or like service so that you can distribute the load across 2 DCs. The next one is iSessions which is found in v10 of the LTM. This will allow you to send traffic from the DR DC to the primary Mysql server in the other DC. In theory if active DC fails, the GTM will send traffic to only the DR DC and the LTM will use the DR mySQL because the health check failed to see the primary MySQL Server in the active DC site.

     

     

     

    Some info about iSessions: Click here.

     

     

    I hope this helps

     

    Bhattman

     

  • Hi RP,

     

    You can certainly round robin your request unfortunately you lose the intelligent DR that you are looking for. Perhaps using a Enhanced DNS Service from a service providor such as Akamai or UltraDNS?

     

     

    Bhattman
  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    You could run the LB's in a kind of reverse configuration from normal.

     

     

    Assuming you don't mind SNAT, run the LB's as a local proxy. All machines would then talk to a local address for MySQL. The LB's then look after whether the traffic goes to the load or the remete MySQL server, and send the traffic to the relevant endpoint. Whether you doit with a pool and priority members, or 2 pools and an iRule to select them is a matter of design (Using 2 pools you could automate it via iControl based on datagroup/class values).
  • For databases, you can use a simple "single node" persistence iRule. It allows you to fail over between the pool members but not switch back automatically when the previously down server comes back up.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/SingleNodePersistence.html

     

     

    Aaron
  • Thanks for all the replies, guys. I think I will explore Aaron's suggestion. Although, I was wondering if node a (primary node) comes back online, is there a way for the F5 to automatically start sending traffic to it instead of manually failing over to it.

     

     

    -rp
  • That's the default behavior if you use priority group activation and set one pool member to a higher priority. The iRule is useful when you want to avoid the automatic "fail back" as this can cause a second outage.

     

     

    Aaron
  • Thanks, Aaron. I will go ahead and give it a try and see how it goes. Thanks to Bhattman

     

    and Hamish too!!

     

    -rp