Skip to content

Commit

Permalink
infra: scale up (#416)
Browse files Browse the repository at this point in the history
* scale up

* cleanup
  • Loading branch information
andreiio authored Oct 13, 2023
1 parent c4eb93d commit 63138e6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# they will be requested for review when someone
# they will be requested for review when someone
# opens a pull request.
* @bvizureanu @aniri @idormenco
* @aniri @idormenco

# More details on creating a codeowners file:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
4 changes: 2 additions & 2 deletions terraform/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ resource "aws_db_instance" "main" {

maintenance_window = "Mon:04:45-Mon:06:00"

performance_insights_enabled = false
# performance_insights_retention_period = 7
performance_insights_enabled = true
performance_insights_retention_period = 7

db_subnet_group_name = aws_db_subnet_group.db_subnet_group.name
vpc_security_group_ids = [aws_security_group.database.id]
Expand Down
2 changes: 1 addition & 1 deletion terraform/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module "ecs_cluster" {
security_groups = [aws_security_group.ecs.id]
instance_types = local.ecs.instance_types

min_size = 1
min_size = 2
max_size = 3
minimum_scaling_step_size = 1
maximum_scaling_step_size = 1
Expand Down
4 changes: 2 additions & 2 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ locals {

db = {
name = "votemonitor"
instance_class = "db.t4g.micro"
# instance_class = "db.t4g.small"
instance_class = "db.t4g.medium"
# instance_class = "db.t4g.micro"
}

networking = {
Expand Down
12 changes: 6 additions & 6 deletions terraform/service_api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module "ecs_api" {

name = "api-${var.env}"
cluster_name = module.ecs_cluster.cluster_name
min_capacity = 1
max_capacity = 2
min_capacity = 2
max_capacity = 4

image_repo = local.images.api.image
image_tag = local.images.api.tag
Expand All @@ -23,8 +23,8 @@ module "ecs_api" {
lb_health_check_enabled = true
lb_path = "/health"

container_memory_soft_limit = 512
container_memory_hard_limit = 1024
container_memory_soft_limit = 1024
container_memory_hard_limit = 2048

log_group_name = module.ecs_cluster.log_group_name
service_discovery_namespace_id = module.ecs_cluster.service_discovery_namespace_id
Expand All @@ -42,8 +42,8 @@ module "ecs_api" {

ordered_placement_strategy = [
{
type = "binpack"
field = "memory"
type = "spread"
field = "instanceId"
}
]

Expand Down

0 comments on commit 63138e6

Please sign in to comment.