Deploying patterns for Floating IP addresses in Compute Engine

This repository provides example implementations of patterns for using floating IP addresses in Compute Engine that can be deployed using Terraform. To learn more about the different patterns, see the companion guide.

The implementations in the subdirectories of this repository are examples. Instead of a real application utilizing a floating IP address, in all examples two nginx webservers are deployed that identify if the first or second server received the request when you request the root document(/).

The following pattern implementations are available:

Subdirectory name Pattern name
1-ilb-active-active Active-active load balancing
2-ilb-failover Load balancing with failover and application-exposed health checks
3-ilb-keepalived Load balancing with failover and heartbeat-exposed health checks
4-routes-ecmp Using equal-cost multipath (ECMP) routes
5-routes-priority Using different priority routes
6-routes-keepalived Using a heartbeat mechanism to switch a route's next hop
7-autohealing-instance Using an autohealing single instance

Each pattern can be deployed independently and only one pattern should be deployed in a project at a time as resource names overlap between the different patterns.

To deploy any of the patterns, follow the instructions in the README.md in the respective subdirectory.