Commit ff4e1c75 authored by John T Skarbek's avatar John T Skarbek

Save some money, change redis instance types

* Changes the instance types of `redis` servers
  * Not to be confused with `redis-cache`
  * Not to be confused with `redis-cache-sentinels`
* Current type is `n1-highmem-16`
  * Gives us 16 cores and 104GB of RAM per instance
  * We only use a whopping 4GB of RAM
  * `redis` is a single core type of service....
  * We aren't constrained by bandwidth, we have a capacity of 16Gbps,
  but any spikes use roughly 200Mbps
  * costs 96cent per hour
* Switches to type `n1-standard-8`
  * Lowers our core count to 8, we'll still have a network capacity of
  16Gbps
  * Lower ram to 52GB, we'll still have 97% room to grow...
  * costs only 34cent per hour
* We aren't network, nor disk bound, so there won't be any change in
performance with this modification
* Since redis stores everything in memory, the data disk will only
contain snapshot information.  It looks like we use defaults for this
and as such, this will always be smaller than the data actually in
memory.  Since we could never store more than what the nodes can
physically store in RAM, this reduces that disk size by half to match
that of RAM.
* Because redis is setup by a shared module in staging and production,
the estimated cost savings of just this MR, is approximately
$1788/monthly
Signed-off-by: default avatarJohn T Skarbek <[email protected]>
parent e0d0e32c
......@@ -243,7 +243,7 @@ variable "machine_types" {
"mailroom" = "n1-standard-4"
"monitoring" = "n1-standard-8"
"pgb" = "n1-standard-4"
"redis" = "n1-highmem-16"
"redis" = "n1-standard-8"
"redis-cache" = "n1-highmem-16"
"redis-cache-sentinel" = "n1-standard-1"
"registry" = "n1-standard-2"
......
......@@ -285,10 +285,11 @@ module "geo-postgres" {
##################################
module "redis" {
allow_stopping_for_update = true
bootstrap_version = 6
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-db-redis-server-single]\""
data_disk_size = 100
data_disk_size = 52
data_disk_type = "pd-ssd"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment