business continuity

now browsing by tag

 
 

Active-Standby between 2 Datacenters

Scenario:

  • You have at least two datacenters running the same application. The primary datacenter is always active. In case of failure/disaster the secondary/backup datacenter must kick in taking control and providing access to your application (disaster recovery)
  • Your application is mapped on a well-defined hostname (ie. www.myapplication.com)
  • On the primary datacenter www.myapplication.com is running on IP a.b.c.d. One the secondary/backup datacenter www.myapplication.com is running on IP x.y.z.t
  • You need your clients traffic to be sent to the primary datacenter and, only in case of unavailability, be transparently sent to the secondary/backup datacenter

Solution:

  • Use GSLB.me in priority balancing mode
  • Define one geohost that will be pointed by www.myapplication.com via a DNS CNAME record
  • Create two targets, one for each datacenter
  • Assign the relevant checks to each target
  • Configure the CNAME record on the primary DNS server that handles the domain myapplication.com

How to configure it:

  1. Register on GSLB.me and log on
  2. Select under which one of the available domains (gslb.us, gslb.info, …) you want to create your geohost. You can choose the domain you prefer, this is purely a “cosmetic” choice. Let’s choose myapplication.gslb.info
  3. Create your geohost: a geohost is the FQDN (Fully Qualified Domain Name) that your authoritative DNS will use as a CNAME for your application hostname (ie. www.myapplication.com). Select “Priority” as your balancing algorithm. This will enable active-standby distribution of incoming traffic towards your datacenters.
  4. Define the first target: the target’s IP address is a.b.c.d and its priority must be 1
  5. Select checks to be performed on the first target
  6. Define the second target: the target’s IP address is x.y.z.t and its priority must be any number higher than 1. This allows the “priority” balancing algorithm to handle active-standby.
  7. Select checks to be performed on the second target
  8. Configure your authoritative DNS to use a CNAME record to have www.myapplication.com point to myapplication.gslb.info
800true numbers under 600false false 800http://www.gslb.me/wp-content/plugins/thethe-image-slider/style/skins/frame-white
  • 5000 slideright true 60 bottom 30
    Slide1
    Go to http://go.gslb.me and logon. If you still don't have an account you can register and then logon.
  • 5000 slideright true 60 bottom 30
    Slide2
    Let's right click on the domain we choose in order to create a new geohost. Let's then click on the menu that is opened and let's add the new geohost.
  • 5000 slideright true 80 bottom 30
    Slide3
    Next, we need to configure the geohost name (it will be prepended to the zone we selected in the previous step), set it to enable and select "Priority" as the balancing algorithm. We can configure DNS replies TTL from here. When done, let's click on "Save" to save changes
  • 5000 slideright true 60 bottom 30
    Slide4
    After clicking on "Save" changes are committed and confirmation is displayed at the bottom of the screen.
  • 5000 slideright true 60 bottom 30
    Slide5
    After creating the geohost we need to add targets: a target is the IP address of our application at each datacenter we are going to load balance. Let's right click on the geohost name and add the target from the popup menu that appears.
  • 5000 slideright true 80 bottom 30
    Slide7
    Let's now configure the IP address of our target, which is the IP address our application runs on on the given datacenter. Let's also set priority to 1. This will set our geohost as primary. Checks schedule time can be set and the list of healthchecks to be performed is also configured here. Once done let's save the changes.
  • 5000 slideright true 80 bottom 30
    Slide9
    Let's now configure the IP address of our second target, which is the IP address our application runs on on the given datacenter. Let's also set priority to 2. This will set our geohost as secondary. Checks schedule time can be set and the list of healthchecks to be performed is also configured here. Once done let's save the changes.
  • 5000 slideright true 60 bottom 30
    Slide10
    After clicking on "Save" changes are committed and confirmation is displayed at the bottom of the screen.
  • 5000 slideright true 60 bottom 30
    Slide11
    Now we completed our geohost and targets configuration. We need to commit this setup to make it active. To do so let's right click on the geohost name on the left hand side of the screen and commit the changes.
  • 5000 slideright true 60 bottom 30
    Slide12
    After committing changes a confirmation popup is displayed at the bottom of the screen.
  • 5000 slideright true 60 bottom 30
    Slide13
    We can now open the map to show our targets' geographical position and availability. Let's right click on the geohost name and open the map.
  • 5000 slideright true 60 bottom 30
    Slide14
    The map shows our targets positions and current availability. It is automatically refreshed every 5 seconds.
  • 5000 slideright true 60 bottom 30
    Slide15
    We can now open the status window to see the status of all geohosts and their targets. Let's right click on the geohost name and open the window.
  • 5000 slideright true 60 bottom 30
    Slide16
    The status window shows the health of our geohosts and targets. It is automatically refreshed every 5 seconds.
  • 5000 slideright true 60 bottom 30
    Slide18
    Let's now right click on the geohost name again to show the DNS entry we need to add to our authoritative DNS for the "myapplication.com" domain in this example.
  • 5000 slideright true 80 bottom 30
    Slide17
    In our example we will need to add to the "myapplication.com" DNS zone the entry "www.myapplication.com. 600 IN CNAME mywebsite.gslb.eu". This enables GSLB.me-based load balancing for your www.myapplication.com fully qualified domain name.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
^