Why should I reserve an instance in Google Cloud? Any experiences? - google-cloud-platform

In Google Cloud, I have the option to reserve instances. See here: https://cloud.google.com/compute/docs/instances/reservations-overview
Note: I am not talking about Committed Use Discounts.
I understand that by reserving an instance, Google guarantees the availability of this instance.
Do I need to be concerned that a Compute Engine instance is not available when I try to create it? Did anybody have bad experiences? Please share!

Why should I reserve an instance in Google Cloud?
To answer your question, there’s a lot key features for "Reservations of Compute Engine”
Reservations provide a very high level of assurance in obtaining capacity for Compute Engine zonal resources. You can use reservations to help ensure that your project has resources for future increases in demand, such as in the following cases:
Growth
Planned or unplanned spikes = (#CoryKramer explain this in the
comment section)
Migration of a large number of virtual machine (VM) instances
Backup and disaster recovery
I think your question is more opinion based, but I suggest you try the "Reservations of Compute Engine” first, to explore and understand the key features of these reservations.
Actually I conducted a mini survey to my network using "Reservations of Compute Engine” , so far there’s no issue occured, you may also review this public documentation how reservations work, pre-requisite requirements and also the Billing to explain here what reservations are billed.

Related

set a price cap for spot instances with EKS

I would like to use spot instances in my cluster. I was trying to create a node group with a spot priced launch template when I discovered it's not possible to specify instance market options like maximum price.
https://github.com/hashicorp/terraform-provider-aws/issues/15118
This seems like a pretty major limitation seeing as spot instances can spike up in price to orders of magnitude more than on-demand.
https://devops.stackexchange.com/questions/893/why-is-the-aws-ec2s-spot-price-greater-than-the-on-demand-price
Is there really no way around this? Is no one using spot instances in EKS?
I had a quick look for you in the Python SDK documentation. I didn't find any mention about what you are looking for in the API https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks.html#EKS.Client.create_nodegroup I guess the same applies in terms of IaC. I would suggest you reach out to your Technical Account Manager (TAM) or AWS Support and let them know about your needs. They will be able to create a feature request for you.

How do you implement cloud solutions without incurring costs during development?

I am completely new to the implementation of cloud solutions. I've just started taking AWS training courses.
But I already have a very fundamental question about the flow of development in cloud projects:
How do you go about developing solutions without incurring costs? I know that there are free tiers, but in practice you need a lot of unfree elements. Especially when working with infrastructure-as-code approaches (e.g. CloudFormation), it can happen that every time you try out the templates, costs can be incurred immediately.
Is there maybe something like a sandbox mode or how else do you go about it in practice?
Outside of the AWS Free Tier you will be billed for creating services.
The best way to keep costs as low as possible is to combing the lowest priced settings (such as instance class) with removing resources you're not using after you're complete. I understand that this will cost, however many resources are now moving to per second billing (where you normally have to pay for at least the first minute) so the cost is kept low.
Additionally when dealing with some services (such as EC2, ECS, Fargate and ECR) you can make use of spot instances to pay sometimes as low as 10% of the original cost which will help to reduce these resources.
To ensure you can recreate resources when you want them use infrastructure as code to reroll out as you need the resources (CloudFormation or Terraform are great offerings for this).
Finally be on the lookout for AWS conferences, they are a great way to pickup AWS credits for attending which will offset your bill against most AWS services.

AWS Support or AWS Expert

I am in little confusion, and would like to solve it with your help.
My website is running well on EC2 since last 2-3 months and I got it migrated with one of AWS Expert, now that expert is not in premises and I am little worry how should I proceed to maintain it so that if any minor/major issue occurs with the running EC2 instance can be taken care immediately.
Options in my mind are:
Hire a person who is good in AWS, can take care all EC2 maintenance works.
Purchase Business support, so that if any major/minor issue occurs can be taken care at earliest, I am in favor of this option since if EC2 goes down nobody can correct it except AWS team which is actively available only when I will be having Business Support.
Please share your feedback.
if any minor/major issue occurs with the running EC2 instance can be taken care immediately.... Purchase Business support,
Please see the Business support plan.
AWS Business support will help you to stay available, support you to resolve your issues, but they won't do it instead of you. They really won't touch your environment.
This answer is opinion based as you placed no hard requirements for your case.
Hire a person who is good in AWS, can take care all EC2 maintenance works
If this is viable and feasible depends if you have enough work for such a person or you would pay to stand by. What may be interesting is option of managed hosting. AWS itself doesn't do managed hosting themselves, but there is a list partners providing managed services.
Under managed services there are different service level, but usually the partners will keep pool of AWS certified experts and they can proactively monitor your environment and do something immediately if needed (usually only the infrastructure is supported, not necessary any custom application).

How do you measure the energy consumption of an EC2 instance ?

I have asked to give a report on the energy consumption of an m5.12xlarge instance. I am wondering how to come up with a factual and approximate number here. Anyone had come across this issue anywhere ?
An important concept of the Cloud is that server utilization is often much higher.
In a normal data center, a server is running 24 hours but is only used a few hours a day, and often not fully utilized in those hours.
In the Cloud, when an instance is not required it can be turned off, which means that the capacity is available for somebody else to use. Instance size can also be selected so that it is big enough for the desired workload, without having to get large servers for a potential future workload.
Thus, there is significantly less wastage in the cloud compared to on-premises servers. I mention this because somebody has presumably asked you to measure the environmental impact of a choice of computing infrastructure, and it's not really accurate to directly compare on-premises vs the Cloud since on-premises is typically over-provisioned and under-utilized.
A good article on this topic: Cloud Computing, Server Utilization, & the Environment | AWS News Blog

Alternative for built-in autoscaling groups for spot instances on AWS

I am currently using spot instances managed with auto-scaling groups. However, ASG has a number of shortcomings for use with spot instances. For example, it cannot launch instances of a different instance type if the current type is experiencing a price spike across all availability zones. It can't even re-distribute the number of running instances across zones (if one zone has a price spike, you're down 30% in the number of running instances.)
Are there any software solutions that I could run which would replace built-in AWS Auto-Scaling Groups? I've heard of SpotInst and Batchly, but I do not trust them. Basically, I think their business plan involves being bought out and killed by Amazon, like what happened to ClusterK. The evidence for this is the bizarre pricing policies and other red flags. I need something that I can self-host and depend on.
AWS recently released Auto Scaling for Spot Fleets which seems to fit your use case pretty well. You can define the cluster capacity in terms of vCPU that you need, choose the instance types you'd like to use and their weights and let AWS manage the rest.
They will provision spot instances at their current market price up to a limit you can define per instance type (as before), but integrating Auto Scaling capabilities.
You can find more information here.
https://aws.amazon.com/blogs/aws/new-auto-scaling-for-ec2-spot-fleets/
It's unlikely that you're going to find something that takes into account everything you want. But because everything in Amazon is an API, so you can write that yourself. There are lots of ways to do that.
For example, you could write a small script (bash, ruby, python etc) that shells out the AWS CLI to get the price, then shells out to launch boxes. For bonus points, use the native AWS SDK library instead of shelling out. (That will be slightly easier to handle errors, etc.) For even more bonus points, open source it, and hope that other people to improve on it!
This script can run on your home computer, or on a t1.micro for $5/month. Or you could write it in node.js, and run it on Lambda for pennies per month.
Here at Spotinst, these are exactly the problems we built Elastigroup to solve.
Elastigroup enables running simultaneously on as many instance types and availability zones (within a region) as you’d like. This is coupled with several things to maintain production availability:
Our algorithm makes live choices for the best Spot markets in terms of price and availability.
When an interruption happens, we predict it about 15 minutes in advance and take all the necessary steps to ensure (and insure) the capacity of your group.
In the extreme case that none of the markets have Spot availability, we simply fall back to an on-demand instance.
We have a great relationship with AWS and work closely with both their technical and business teams to provide our joined customers with the best experience possible. As we manage resources inside your own AWS account, I wouldn’t put the relationship between us as a concern, to begin with.