Ha fip: Difference between revisions
No edit summary |
|||
Line 26: | Line 26: | ||
[...] | [...] | ||
</pre> | </pre> | ||
=== Allocating an internal VIP === |
Revision as of 16:04, 27 June 2024
This is not a complete article: This is a draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.
High Availability using a floating IP
A single VM hosting an application can fail and be offline, which also makes the application inaccessible.
To avoid such a scenario, it is possible to make the floating IP (FIP) high-available, which in turn can be used to make the application high available too.
Active-Passive High-availability
To accomplish a setup like this, we need the following:
- 2 VMs hosting the application
- 1 VIP (shared IP) RFC1918 from within your project
- 1 HA Floating IP
- plan on how to access the real VMs if you don't have IPv6 connectivity
Now it's time to build the 2 VMs and install the application on both systems, this example here will only have nginx running, displaying the default index page and show that the application is reachable.
Installing nginx and keepalived
root@web-srv-1:~# apt-get update && apt-get -y dist-upgrade && apt-get install -y nginx keepalived [...] root@web-srv-2:~# apt-get update && apt-get -y dist-upgrade && apt-get install -y nginx keepalived [...]