swiro is a switching route tool for AWS to realize VIP (Virtual IP) with Routing-Based High Availability pattern.
This pattern is possible to perform failover (switching of the connection destination) of the EC2 redundant across the subnet (AZ).
- Switching routes
$ swiro switch -r rtb-xxxxxx -v 10.0.0.1 -I i-xxxxxx
In most cases you can switch the routing with the Route Table ID as follows:
$ swiro switch -r rtb-xxxxxx -v 10.0.0.1 -I i-xxxxxx Switch the route below setting: ============================================ Route Table: route_table_name (rtb-xxxxxx) Virtual IP: 10.0.0.1 -------- Src: src_instance_name (i-yyyyyy) \\ ======> Dest: i-xxxxxx ============================================ Are you sure? (y/n) [y]: y Success!!
You can also switch by specifying Route Table Name instead of Route Table ID.
$ swiro switch -r route_table_name -v 10.0.0.1 -I instance_name
To install, use
$ go get -d github.com/taku-k/swiro
- Fork (https://github.com/taku-k/swiro/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...command and confirm that it passes
- Create a new Pull Request