This repository has been archived by the owner on Apr 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws/gce: Standardise LB health check configs
For all load balancer health checks on AWS and GCE. Using variables so that they are always the same. Most of these values have been reduced because it was taking a very long time for new instances to come into service. Change the following: - interval to 5s which is the minimum supported by AWS. This has reduced AWS from 30s and increased GCE from 1s. - timeout to 2s which is the minimum supported by AWS. This has reduced AWS from 5s and increased GCE from 1s. - healthy threshold to 2 requests. This has not changed AWS or GCE. - unhealthy threshold to 2 requests. This has changed AWS from 10 and not changed GCE. I'm not 100% confident about the values. They weren't thoroughly tested when we first introduced them for GCE and I suspect we might want to experiment with them in the future, but this is a good start. I've changed the target for API on AWS from the default of `TCP:8080` to `HTTP:8080/info` in order to match GCE and give a more accurate check. Other targets remain as their defaults but we have to pass them because they're mandatory. They don't match GCE because GCE can't do TCP health checks. This will *not* apply cleanly to existing GCE environments due to a bug in Terraform. This should be fixed in the future by hashicorp/terraform#1894. But for the timebeing I think it's important enough that we should delete existing forwarding rules, target pools, and health checks, then let Terraform recreate them with the correct config.
- Loading branch information
Showing
6 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
resource "google_compute_http_health_check" "http-check" { | ||
name = "${var.env}-http-check" | ||
request_path = "/" | ||
check_interval_sec = 1 | ||
timeout_sec = 1 | ||
check_interval_sec = "${var.health_check_interval}" | ||
timeout_sec = "${var.health_check_timeout}" | ||
healthy_threshold = "${var.health_check_healthy}" | ||
unhealthy_threshold = "${var.health_check_unhealthy}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters