Skip to content

Commit

Permalink
Upgrade redis server
Browse files Browse the repository at this point in the history
We have observed timeouts in the application log and some users are
impacted.
This upgrades production to Premium and high availibilty across
availibity zones.

Also pinned server version to 6 and increased replicas to 2.
  • Loading branch information
saliceti committed Sep 19, 2023
1 parent 01425f7 commit 615de6c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion terraform/aks/config/production_aks.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"cluster": "production",
"namespace": "git-production",
"enable_monitoring": false,
"enable_statuscake_alerts": true
"enable_statuscake_alerts": true,
"replicas": 2,
"redis_capacity": 1,
"redis_family": "P",
"redis_sku_name": "Premium"
}
4 changes: 4 additions & 0 deletions terraform/aks/databases.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ module "redis-cache" {
azure_enable_monitoring = var.enable_monitoring
azure_patch_schedule = [{ "day_of_week" : "Sunday", "start_hour_utc" : 01 }]
azure_maxmemory_policy = "allkeys-lfu"
server_version = 6
azure_capacity = var.redis_capacity
azure_family = var.redis_family
azure_sku_name = var.redis_sku_name
}

module "postgres" {
Expand Down
13 changes: 13 additions & 0 deletions terraform/aks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ variable "azure_enable_backup_storage" { default = true }
variable "replicas" { default = 1 }
variable "memory_max" { default = "1Gi" }

variable "redis_capacity" {
type = number
default = 1
}
variable "redis_family" {
type = string
default = "C"
}
variable "redis_sku_name" {
type = string
default = "Standard"
}

locals {
azure_credentials = try(jsondecode(var.azure_credentials), null)
app_resource_group_name = "${var.azure_resource_prefix}-${var.service_short}-${var.config_short}-rg"
Expand Down

0 comments on commit 615de6c

Please sign in to comment.