[FOLIO-2057] SPIKE: explore AWS K8s cost models Created: 31/May/19  Updated: 03/Jun/20  Resolved: 13/Jun/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Jakub Skoczen Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks FOLIO-2072 automate standing up CI cluster Open
Relates
relates to FOLIO-2019 SPIKE: evaluate Rancher 2.x vs vanill... Closed
relates to UXPROD-1827 CI-integrated continuous deployment (... Closed
relates to FOLIO-2117 Kubernetes integration (Q2, container... Closed
relates to FOLIO-2118 CI-integrated continuous deployment (... Closed
relates to UXPROD-1823 Kubernetes integration (Q3, Okapi fea... Draft
Sprint: CP: sprint 65
Story Points: 3
Development Team: Core: Platform

 Description   

Cost will vary depending on the approach:

  • spot EC2 instances vs EKS vs reserved EC2 instances
  • Postgres on EC2 vs RDS
  • container for the UI vs S3 bundles

Factors to take into account:

  • number of clusters (potentially low for development purposes)
  • if there are any reason for why we would need to split clusters


 Comments   
Comment by Ian Hardy [ 05/Jun/19 ]

Doing some initial exploration it looks like RDS instances: Using m4.large size instances (2 cpu, 5 gb ram, 500) for example, a naive estimate for monthly compute/storage costs might be,

ec2:
On Demand: $123
Reserved (1 year no upfront): 92

RDS:
On Demand: $185
Reserved (1 year no upfront): $145

RDS pricing is broken up into Database storage, Backup Storage, and Data Transfer.

Database storage:
The above estimate is for SSD. The base performance would be 1500 IOPS on a 500GB SSD. Its also possible to pay for provisioned IOPS instead of SSD storage. Complete details on RDS storage are here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html

Backup Storage:
Backup storage equal to the amount of provisioned storage is free, and likely sufficient for CI.

An initial guess is that we could pay up to 2x the upfront cost of running ec2 instances with the same computer resources/storage (not factoring any additional backup storage for ec2) for the benefits of RDS. If our initial goal is to provide storage for the CI environment it seems like RDS is not cost prohibitive and offers some real savings on the labor required to sysadmin PSQL on EC2.

Comment by mark.stacy [ 10/Jun/19 ]

Ian Hardy I have provided information on EKS and EC2 K8s costs within a markdown gist. https://gist.github.com/mbstacy/50e5cfa5c4faad560c513595977ad096

Comment by Ian Hardy [ 11/Jun/19 ]

Thanks for the writeup Mark.

A few other updates since this ticket was first written.

>number of clusters (potentially low for development purposes)
One cluster, running EKS is all that is needed.
>if there are any reason for why we would need to split clusters
Not planning on splitting across regions. Cluster has worker nodes in different AZs for the us east region
>container for the UI vs S3 bundles
S3 bundles are preferred since no compute resources are required

Since we're running the one cluster, I think it would make sense to EKS (already using) and RDS. Should there be a need to run a large number of database instances in the future we could try to optimize for cost by using ec2. It seems reasonable to me to start with reserved reserved instances for worker nodes. There's some additional overhead to use spot instances to make sure the cluster can handle an instance disappearing on short notice

Generated at Thu Feb 08 23:17:53 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.