informatica:linux:heartbeat
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:heartbeat [2012/07/03 09:45] – javi | informatica:linux:heartbeat [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
* Los dos nodos se comunican mediante trafico multicast, por lo que la red/ | * Los dos nodos se comunican mediante trafico multicast, por lo que la red/ | ||
+ | |||
Line 19: | Line 20: | ||
^ Nombre ^ Direccion IP ^ Interfaz de red ^ Descripcion ^ | ^ Nombre ^ Direccion IP ^ Interfaz de red ^ Descripcion ^ | ||
- | | balancer.dev.jj.com | 10.0.0.18 | -- | CNAME (' | + | | balancer.dev.jj.com | 10.0.0.200 | -- | IP virtual. La comparten los dos nodos de heartbeat | |
| balancer-1.dev.jj.com | 10.0.0.15 | eth2 | Nodo maestro de heartbeat | | | balancer-1.dev.jj.com | 10.0.0.15 | eth2 | Nodo maestro de heartbeat | | ||
| balancer-2.dev.jj.com | 10.0.0.17 | eth3 | Nodo maestro de heartbeat | | | balancer-2.dev.jj.com | 10.0.0.17 | eth3 | Nodo maestro de heartbeat | | ||
Line 61: | Line 62: | ||
ucast eth2 10.0.0.15 | ucast eth2 10.0.0.15 | ||
- | auto_failback | + | auto_failback |
node balancer-1.dev.jj.com | node balancer-1.dev.jj.com | ||
Line 70: | Line 71: | ||
| 225.0.0.1 | Multicast address. Should be the same on both nodes | | | 225.0.0.1 | Multicast address. Should be the same on both nodes | | ||
| 10.0.0.15 | IP address of the node. In this case belongs to balancer-1.dev.jj.com | | | 10.0.0.15 | IP address of the node. In this case belongs to balancer-1.dev.jj.com | | ||
- | | node balancer-1.dev.jj.com\ node balancer-2.dev.jj.com | Nodes name. Should be the same on both nodes. If no DNS entry have them added to /etc/hosts | | + | | node balancer-1.dev.jj.com\\ node balancer-2.dev.jj.com | Nodes name. Should be the same on both nodes. If no DNS entry have them added to / |
+ | | auto_failback off | Prefiero hacer un sanity check antes de volver a poner como activo el nodo que fallo | | ||
---- | ---- | ||
Line 77: | Line 79: | ||
< | < | ||
- | balancer-1.dev.jj.com 10.0.0.18 | + | balancer-1.dev.jj.com 10.0.0.200 haproxy |
</ | </ | ||
| balancer-1.dev.jj.com | Nombre del nodo maestro. Tiene que ser el mismo en los dos nodos | | | balancer-1.dev.jj.com | Nombre del nodo maestro. Tiene que ser el mismo en los dos nodos | | ||
- | | 10.0.0.18 | Direccion IP que comparten los dos nodos. Tiene que ser el mismo en los dos nodos | | + | | 10.0.0.200 | Direccion IP virtual |
+ | | haproxy | Opcional. Servicio que para y arranca cuando se para/ | ||
+ | |||
+ | |||
+ | |||
+ | |||
===== Servicio ===== | ===== Servicio ===== | ||
Line 87: | Line 95: | ||
sudo / | sudo / | ||
- | Nodo activo | + | Nodo **ACTIVO** |
sudo ip addr sh eth2 | sudo ip addr sh eth2 | ||
Line 95: | Line 103: | ||
link/ether 00: | link/ether 00: | ||
inet 10.0.0.15/ | inet 10.0.0.15/ | ||
- | inet 10.0.0.18/24 brd 10.0.0.255 scope global secondary eth2:0 | + | inet 10.0.0.200/24 brd 10.0.0.255 scope global secondary eth2:0 |
inet6 fe80:: | inet6 fe80:: | ||
| | ||
Line 102: | Line 110: | ||
Existe la linea con la IP compartida: | Existe la linea con la IP compartida: | ||
- | inet 10.0.0.18/24 brd 10.0.0.255 scope global secondary eth2:0 | + | inet 10.0.0.200/24 brd 10.0.0.255 scope global secondary eth2:0 |
- | Nodo activo | + | Nodo **FAILOVER** |
sudo ip addr sh eth3 | sudo ip addr sh eth3 | ||
Line 120: | Line 128: | ||
1. (Desde cliente) Hacer un ping a la IP compartida: | 1. (Desde cliente) Hacer un ping a la IP compartida: | ||
- | ping 10.0.0.18 | + | ping 10.0.0.200 |
2. (En el nodo maestro) Parar el servicio heartbeat: | 2. (En el nodo maestro) Parar el servicio heartbeat: |
informatica/linux/heartbeat.1341308720.txt.gz · Last modified: 2015/04/13 20:19 (external edit)