AWS网络应用计算成本是否意味着网站被访问的时间?

huangapple go评论53阅读模式
英文:

Does AWS web app Compute costs mean the amount of time a website is visited?

问题

I was thinking of hosting in AWS web app. However, After seeing computing costs, I wasn't clear what it meant.

Does it meant straight away $50/month or per hour means the rate of app when it using per hour. Please explain, thanks!

我在考虑使用AWS托管网页应用。然而,在看到计算成本之后,我不太明白它是什么意思。

是指立刻每月$50还是每小时的费用,即应用程序每小时使用时的费率。请解释一下,谢谢!

英文:

I was thinking of hosting in AWS web app. However, After seeing computing costs, I wasn't clear what it meant.

Does it meant straight away $50/month or per hour means the rate of app when it using per hour. Please explain, thanks!

答案1

得分: 1

这完全取决于你从AWS购买了什么。每项服务都有自己的价格标签。

你将此标记为AWS App Runner,这是一项带有价格标签的服务,但根据问题,我认为你不打算使用AWS App Runner,而是因为错误添加了标记(可能是输入了类似aws-app的内容)。

在AWS上最基本的事情是购买EC2实例(即虚拟服务器,即虚拟计算机)。你可以登录到虚拟服务器,并像设置真实服务器一样设置它。有各种各样的服务器类型(实例类型),所以根据你选择的类型,月费用可以从每月5美元到每月200美元甚至更高不等。

每当实例开启时,你都需要支付一定的价格,还需要支付虚拟硬盘(EBS卷)的费用,直到从你的账户中删除服务器为止。如果你希望Web应用程序始终运行,那么你需要让服务器全天候运行,这就是月费用的计算方式。

请注意,实例的月费用不包括EBS卷(硬盘),因为它是单独计算的。价格约为每GB每月0.10美元(对于默认的gp2类型。切换到gp3可享受0.02美元的折扣,而没有任何不利因素。这是较新的类型,我认为默认仍然是gp2,直到他们彻底测试了gp3的兼容性)。某些类型的实例确实包含了真实的硬盘,不需要EBS,但通常更昂贵,所以你可能不会使用这种类型。

不要因为试图使用最便宜的可能服务器和最小的可能硬盘而感到愧疚。系统就是为此而设计的,而且不像杰夫·贝索斯需要捐款。如果以前租过真实服务器,你可能会认为有某种升级成本。AWS没有这个。更改设置、租用新实例、删除它们等都是免费、完全自动化的,几乎是瞬时完成的。

实际上,你不需要为整个月租用实例,因为价格实际上是每小时或每分钟计算的。AWS的一个优点是,如果你需要执行复杂的处理任务,可以短时间内购买非常强大的服务器。虽然这不是你当前正在寻找的,但我还是提一下。


还有所谓的“无服务器”服务,如API Gateway和AWS Lambda。对于这些类型的服务,通常按请求付费。它们有优点和缺点。如果你的网站只是一堆不变的文件,那么在S3中无服务器地托管它是可能的,而不需要太多麻烦。否则,你将不得不重新编写它,使其在Lambda中工作,因为Lambda与其他任何东西都不兼容。

英文:

It fully depends on what you buy from AWS. Each service has its own price tag.

You tagged this as AWS App Runner, which is a service with a price tag, but based on the question I think you aren't planning to use AWS App Runner and you added the tag by mistake (maybe you typed in something like aws-app)

The most basic thing you can do on AWS is buy an EC2 instance (i.e. a virtual server i.e. a virtual computer). You can log into your virtual server and set it up just like a real server. There are a wide variety of server types (instance types) so depending on which one you choose, this can cost from $5 a month up to $200 a month or more.

You pay a certain price for the instance whenever it is turned on, and you pay for the virtual hard disk (EBS volume) until you delete the server from your account. If you want the web app to run all the time then you will need your server to run 24/7 and that is how the monthly price is calculated.

Be aware the displayed monthly price for the instance does not include the EBS volume (hard disk) as it is calculated separately. The price is about $0.10 per month per GB (for the default gp2 type. Change it to gp3 for a $0.02 discount with literally no downside. This is the newer type and I think the default is still gp2 until they thoroughly test the compatibility of gp3). Some types of instances do have real hard disks included in them and don't need EBS, but those are usually more expensive ones so you probably won't use one.

Don't feel bad about penny-pinching by trying to use the cheapest possible server and smallest possible hard disk. That's what the system is designed for, plus it's not like Jeff Bezos needs donations. If you've rented a real server before you might think there's some kind of upgrade cost. AWS doesn't have that. It's free, fully automated and almost instant to change your settings, rent new instances, delete them, whatever.

You don't have to have an instance for a whole month, as the price is actually calculated every hour or minute. One cited advantage of AWS is that if you need to do a difficult processing task, you can buy a very powerful server for a very short time. This isn't what you're looking for right now, but I mention it anyway.


There are also so-called "serverless" services, such as API Gateway and AWS Lambda. With these types of services you usually pay per request. They have advantages and disadvantages. If your website is just a bunch of files that don't change, then it is possible to host it serverlessly in S3 without much fuss. Otherwise you will have to rewrite it to make it work in Lambda as Lambda is not compatible with anything else.

huangapple
  • 本文由 发表于 2023年5月26日 00:06:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76334305.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定