fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Extend fleet-terraform modules to support multiple read replicas in RDS

Open rfairburn opened this issue 9 months ago • 3 comments

Currently deployments with over 50k hosts hit the read replica significantly harder than the writer. Because of this, scaling both to accommodate the load on a reader results in a heavily under-utilized writer.

Aurora best practices are to have all nodes be the same size so that any can be promoted to a writer at any time, so using differently-sized nodes is not an option.

Therefore, we should extend the fleet-terraform modules (specifically the byo-vpc module) to support 3 or more read replicas optionally with a parameter.

rfairburn avatar Apr 08 '25 14:04 rfairburn

Testing below changes.

Changes https://github.com/fleetdm/confidential/blob/rds-dynamic-replicas/infrastructure/cloud/template/main.tf#L72 https://github.com/fleetdm/confidential/blob/rds-dynamic-replicas/infrastructure/cloud/template/main.tf#L95 https://github.com/fleetdm/fleet-terraform/blob/rds-dynamic-replicas/variables.tf#L82 https://github.com/fleetdm/fleet-terraform/blob/rds-dynamic-replicas/byo-vpc/main.tf#L54

BCTBB avatar Apr 09 '25 18:04 BCTBB

Tested with brand new fleet instance. Fleet is accessible and works with 1 replica.

Also tested scaling replicas up and down.

BCTBB avatar Apr 09 '25 21:04 BCTBB

PR: https://github.com/fleetdm/confidential/pull/10257 PR: https://github.com/fleetdm/fleet-terraform/pull/26

BCTBB avatar Apr 09 '25 21:04 BCTBB

Scaling hosts, a dance, More read replicas advance, Smooth flow, like a trance.

fleet-release avatar Apr 11 '25 15:04 fleet-release