mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-13 17:56:26 +00:00
Tidy up like it's 2019
This commit is contained in:
@@ -4,20 +4,21 @@ While having a self-healing, scalable docker swarm is great for availability and
|
||||
|
||||
In order to provide seamless external access to clustered resources, regardless of which node they're on and tolerant of node failure, you need to present a single IP to the world for external access.
|
||||
|
||||
Normally this is done using a HA loadbalancer, but since Docker Swarm aready provides the load-balancing capabilities (routing mesh), all we need for seamless HA is a virtual IP which will be provided by more than one docker node.
|
||||
Normally this is done using a HA loadbalancer, but since Docker Swarm aready provides the load-balancing capabilities (*[routing mesh](https://docs.docker.com/engine/swarm/ingress/)*), all we need for seamless HA is a virtual IP which will be provided by more than one docker node.
|
||||
|
||||
This is accomplished with the use of keepalived on at least two nodes.
|
||||
|
||||
## Ingredients
|
||||
|
||||
```
|
||||
Already deployed:
|
||||
[X] At least 2 x CentOS/Fedora Atomic VMs
|
||||
[X] low-latency link (i.e., no WAN links)
|
||||
!!! summary "Ingredients"
|
||||
Already deployed:
|
||||
|
||||
New:
|
||||
[ ] 3 x IPv4 addresses (one for each node and one for the virtual IP)
|
||||
```
|
||||
* [X] At least 2 x swarm nodes
|
||||
* [X] low-latency link (i.e., no WAN links)
|
||||
|
||||
New:
|
||||
|
||||
* [ ] At least 3 x IPv4 addresses (one for each node and one for the virtual IP)
|
||||
|
||||
## Preparation
|
||||
|
||||
@@ -66,10 +67,10 @@ That's it. Each node will talk to the other via unicast (no need to un-firewall
|
||||
|
||||
## Chef's notes
|
||||
|
||||
1. Some hosting platforms (OpenStack, for one) won't allow you to simply "claim" a virtual IP. Each node is only able to receive traffic targetted to its unique IP. In this case, keepalived is not the right solution, and a platform-specific load-balancing solution should be used. In OpenStack, this is Neutron's "Load Balancer As A Service" (LBAAS) component. AWS and Azure would likely include similar protections.
|
||||
1. Some hosting platforms (*OpenStack, for one*) won't allow you to simply "claim" a virtual IP. Each node is only able to receive traffic targetted to its unique IP, unless certain security controls are disabled by the cloud administrator. In this case, keepalived is not the right solution, and a platform-specific load-balancing solution should be used. In OpenStack, this is Neutron's "Load Balancer As A Service" (LBAAS) component. AWS, GCP and Azure would likely include similar protections.
|
||||
2. More than 2 nodes can participate in keepalived. Simply ensure that each node has the appropriate priority set, and the node with the highest priority will become the master.
|
||||
|
||||
### Tip your waiter (donate) 👏
|
||||
### Tip your waiter (support me) 👏
|
||||
|
||||
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
|
||||
|
||||
|
||||
Reference in New Issue
Block a user