The Guru College

High Availability LAMP Stacks with Keepalived (Part 2)

Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you’ve written that can determine node health, that’s great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the vrrp_script directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for vrrp_script to work, and you need to list the scripts before the vrrp_instance they are called in. Again, if you use my example password and the IP address listed here, you deserve any punishment you get.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you’ve written that can determine node health, that’s great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the vrrp_script directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for vrrp_script to work, and you need to list the scripts before the vrrp_instance they are called in. Again, if you use my example password and the IP address listed here, you deserve any punishment you get.

Here is my example configuration file, after the additions of the scripts:

``

```Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you’ve written that can determine node health, that’s great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the vrrp_script directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for vrrp_script to work, and you need to list the scripts before the vrrp_instance they are called in. Again, if you use my example password and the IP address listed here, you deserve any punishment you get.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you’ve written that can determine node health, that’s great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the vrrp_script directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for vrrp_script to work, and you need to list the scripts before the vrrp_instance they are called in. Again, if you use my example password and the IP address listed here, you deserve any punishment you get.

Here is my example configuration file, after the additions of the scripts:

``

  
````Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
```Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
  
`````Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
```Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
``` 
  
````Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
```Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

``Now that you have keepalived up, and you are able to fail the IP addresses over between the hosts, you will need to address another crucial question: under what conditions should keepalived fail the IPs to the second host? For us it was pretty simple: if apache and mysql are both running, the node is healthy. If you have a shell script you've written that can determine node health, that's great too. Just pay attention to the exit code you set, and you should be good to go.

The setup is done with the `vrrp_script` directive, where you tell keepalived what scripts to run, and what the outcome of those scripts is going to be on the priority level of each VIP. Two things to note: you need at least keepalived version 1.1.13 for `vrrp_script` to work, and you need to list the scripts _before_ the `vrrp_instance` they are called in. Again, if you use my example password and the IP address listed here, _you deserve any punishment you get_.

Here is my example configuration file, after the additions of the scripts:

`` 
  
``` 
  

`````

The script directive should be pretty obvious: it’s the command you are going to execute to get a return status. (I’m using killall -0, as it’s an exceptionally cheap way to determine if a process with a given name exists at least once in the process table.) The interval is the time, in seconds, between checks, and the `` weight is the number of points of priority are removed when the check fails. So, as long as your SLAVE config is set to a number higher than 51, when either mysql or httpd aren’t running, the VIP should fail over.

Cheap Wireless TTL Flash Options | Home | Posts and free time