-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get EC2 and RDS reserved instances to reduce costs #723
Comments
|
@peterdudfield guessing you mean reserve not research? Depending how you're managing billing, I'm not sure I'd recommend incorporating making the actual reservations into your terraform. Reserved Instances are automatically applied to running on-demand instances, so once the reservations are made at your account/billing level you wouldn't need to change anything on the Terraform side. Happy to share more if useful. |
Thanks @jamescrowley , yea any info on, links how to do this, that would be great |
Is there a way I could learn or lookup what is the current configuration and spend associated with ec2 and RDS ? Knowing what the current spend would help strategize this better. Also I am curious to see if we are able to rearchitect the current setup (if possible) to use spot instance or even better serverless with lambda to take advantage of cost options in the cloud. So if someone could clarify the below questions - it would help me research and recommend the best ways to cut down the cost.
I am happy to support either ways. In any case - there is very little scope and involvement of Terraform, if all. |
|
@peterdudfield we should definitely be able to reduce costs if they're always on, but in particular given our climate focus and to @naveen-vijay's point, I'd suggest we first review if there was an alternative to running that infra 24/7. It may be that your elastic beanstalk / terraform config is already set to scale to 0 though. I can see some airflow related usage of elastic beanstalk in the terraform but I'm assuming that's task-based (and so spins down again). Also ideally if you were able to provide read-only access to the AWS account I'd be happy to review and see what the options might be based on previous usage. If either of those are worthwhile and feasible, I'd be happy to dig into that further. |
Thanks @jamescrowley for this. Those Elastic Beasntalk dont scale down, as they need to be ready to go. I.e if somebody wants a forecast, they need it straight away. Perhaps on our dev envionrment we could do this, but not sure to be honest. The elasticbenstalk apps we have are
I think we would be willing to do Partial payment for a year? Im intereted in roughly how much that would save? |
@peterdudfield I’ll take a closer look at the TF but assuming you have access, AWS will have generated some recommendations and estimated savings - https://docs.aws.amazon.com/cost-management/latest/userguide/ri-recommendations.html#viewing-rex Do you know what the cold start time is like? And the idle time vs actually serving requests? |
What do you mean by start time? For the API is active every 2 minutes. Some of the others its a bit more idle, but we want the start time to be very little. The airflow needs to be active all the time. |
@peterdudfield cold start time is how long it takes from first request to be served up a response (if the environment is spun down to 0). The shorter you can get it (most often in a Lambda world) the more readily you can scale to zero. The other aspect I'd look at here is utilisation of the provisioned capacity - how often is the traffic peaky, how often is the server over-provisioned? (appreciate that beanstalk will already be doing some of the work here in terms of auto-scale), Or is it pretty steady and predictable? Happy to hop on a call sometime if it would be useful |
I think we just cant scale down to 0, they need to 1, and then they get used every minute. |
Sure, understood :) Depending on if you go for a convertible or standard reserved instance it should be 30-40% discount depending on the instance types. Worth checking the recommendations AWS makes in the console. You can also get an estimate here: https://aws.amazon.com/ec2/pricing/reserved-instances/pricing/ |
Is there a way in terraform to research the ec2 and rds instances. This should bring down costs for us
WARNING: this is a good first issue, if you know terraform
The text was updated successfully, but these errors were encountered: