cityofaustin / atd-data-tech

Austin Transportation Data & Technology Services
17 stars 2 forks source link

Identify AWS cost savings opportunities #7388

Open johnclary opened 3 years ago

johnclary commented 3 years ago
johnclary commented 3 years ago

@sergiogcx would add your high-level thoughts here?

sergiogcx commented 3 years ago

@johnclary Yes, one of my regrets when we built the Vision Zero hasura is that I may have over-engineered it with NAT instances which are a bit pricy to run. Basically, NAT gateways give instances in a private subnet access to the internet. While they are great for protection of a private cluster, they are not necessary. There are other ways to protect nodes from external use.

For Vision Zero, we have a total of 4 private subnets, and for each you need a NAT. Each nat costs about $0.045 per hour, and we have four, which should total about $130 per month in possible cost savings, about $1500 a year.

We don't use NAT instances in Moped, the nodes are protected using security rules instead and we can do the same for VisionZero.

We may also be able to save more money by not using Fargate at all, and to just move all our Hasura containers to a couple EC2 instances, the only problem is that it will be a bit more difficult to scale up when needed.

johnclary commented 3 years ago

thanks sergio!