Skip to content

Instantly share code, notes, and snippets.

@0xMH
Last active September 20, 2018 17:32
Show Gist options
  • Save 0xMH/429e69ae416ee08e833b4ffc80e26985 to your computer and use it in GitHub Desktop.
Save 0xMH/429e69ae416ee08e833b4ffc80e26985 to your computer and use it in GitHub Desktop.
Highly Available / Fault Tolerant VPN Cluster

Imgur

To achieve this, I built out a cluster of hosts using Amazon's EC2 Container Service and run multiple standalone OpenVPN containers in an Auto-scaling group on each host, ensuring high availability. An Elastic Load Balancer routes traffic to the hosts, which then redirect traffic to the appropriate containers. I created a mounted volume on both of my ECS Nodes which utilizes Elastic Filesystem to store configuration files for my OpenVPN containers ensuring there is no duplication of data between the various containers. And....is it fast? You betcha! From the time ECS recognizes there has been a failure with one of the containers, a new one is up and running within 5 seconds.

https://hub.docker.com/r/kylemanna/openvpn/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment