Amazon EC2 pricing question

2020-06-12 02:26发布

I took my first step today on working with cloud servers and chosed Amazon EC2 for this project. Since I am a bit of a newcomer on this, I didn't fully understand their pricing:

  • What happens when a instance is idling with no connections being made. Does it still cost us money?

It would be sad to have instances idling and costing us money when we do not use them...

Thanks a lot!

标签: amazon-ec2
5条回答
家丑人穷心不美
2楼-- · 2020-06-12 03:12

It you use spot instances then you only pay currently around 30% so thenm it is really cheap...

查看更多
手持菜刀,她持情操
3楼-- · 2020-06-12 03:14

Yes, an idling instance still costs money. The idea is to launch and terminate them dynamically as your load fluctuates ... but even with this the base image WILL cost you money the whole time it's running. Note that an entire month of a small linux image only runs about $60, and that's really not all that bad.

查看更多
我只想做你的唯一
4楼-- · 2020-06-12 03:14

You can use CloudWatch to terminate instances based on their resource usage, for example terminating instances below a certain amount of CPU/disk/network utilization.

查看更多
Viruses.
5楼-- · 2020-06-12 03:17

If you don't need an instance then 'terminate' it and you won't be billed. You can also persist an instance image to disk -- you'll only be billed for storage (cheap!), and you'll be able to restart your machine in the future, if need be. If you want to be able to easily stop and persist images, and also to quickly restart an image, then I strongly recommend that you stick only to EBS-backed machines. The other image types can be a hassle to stop, persist and restart, and can take up to 2 hours to launch.

查看更多
乱世女痞
6楼-- · 2020-06-12 03:18

What happens when a instance is idling with no connections being made. Does it still cost us money?

Yes, it costs money when the instance is powered-on, no matter if it does productive work or not.

It would be sad to have instances idling and costing us money when we do not use them...

The advantage of EC2 is that you can shut down idle instances and restart them later. Of course, for a public-facing web service, you need at least one web server running at all time, so this applies more for peak-time extra capacity.

In contrast, Google App Engine manages server instance lifecycle automatically, and only bills for CPU cycles (and other resources) that you actually use. But in order for them to be able to do that, you are severely limited in what you can do, and have to trust them to properly scale your application (no way to take an active part in server deployment).

查看更多
登录 后发表回答