前段时间有一个新闻在业界沸沸扬扬,即指责X云主机在关机状态下仍然计费不合理,给用户带来了困扰,比如以下场景:
1 测试环境场景:
每次搭建复杂的测试场景,需要花费大量时间精力,本次测试到下次测试间,资源处于闲置状态。
用户痛点:如果保留环境资源,需要为资源支付费用;如果释放资源,则下次测试需要大量重复部署工作。
用户期望:既能保留测试环境,又无需为空闲资源支付额外费用。
当前主要公有云厂商的方案:
AWS:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-ug.pdf
Stopping an instance
When an instance is stopped, the instance performs a normal shutdown, and then transitions to a stopped state. All of its Amazon EBS volumes remain attached, and you can start the instance again at alater time.You are not charged for additional instance usage while the instance is in a stopped state. A minimum of one minute is charged for every transition from a stopped state to a running state. If the instance typewas changed while the instance was stopped, you will be charged the rate for the new instance typeafter the instance is started. All of the associated Amazon EBS usage of your instance, including rootdevice usage, is billed using typical Amazon EBS prices.When an instance is in a stopped state, you can attach or detach Amazon EBS volumes. You can alsocreate an AMI from the instance, and you can change the kernel, RAM disk, and instance type.
Terminating an instance
When an instance is terminated, the instance performs a normal shutdown, then the attached AmazonEBS volumes are deleted unless the volume's deleteOnTermination attribute is set to false. Theinstance itself is also deleted, and you can't start the instance again at a later time.To prevent accidental termination, you can disable instance termination. If you do so, ensure thatthe disableApiTermination attribute is set to true for the instance. To control the behaviorof an instance shutdown, such as shutdown -h in Linux or shutdown in Windows, set theinstanceInitiatedShutdownBehavior instance attribute to stop or terminate as desired.Instances with Amazon EBS volumes for the root device default to stop, and instances with instancestoreroot devices are always terminated as the result of an instance shutdown.
AWS中实例提供两种状态,停止实例(stopping)和释放实例(Terminating)。
停止实例状态下,EBS卷仍然挂载在实例上,用户可以快速启动实例;
用户无需为停止状态的实例付费,每次从停止到运行状态至少会计费1分钟;
如果在停止时改变了实例类型规格,启动后按新的实例类型收费;
而实例所使用的EBS存储则会按EBS的计价进行计费;
释放实例状态下,EBS卷会被删除,除非进行另外的设置;实例也会被删除;
可见,AWS在停止实例状态下,用户的配置得以保存,而用户需要为存储而无需为计算实例付费。
aliyun:https://help.aliyun.com/knowledge_detail/40653.html
按量付费资源从创建开始付费,到释放结束付费,按秒收费,以一个整点为一个结算周期(均以 UTC+8 时间为准)。整点结算完进入新的结算周期时,如果账号可用余额小于上一周期的账单金额,您会收到短信或邮件提醒余额不足。
可见,阿里云的计费方式与AWS不同,只有释放实例才会结束计费,停止实例不会停止计费。注意:
微软:https://www.azure.cn/pricing/details/virtual-machines/
如果您的实例处于“已停止取消分配”状态,将不对它计费。如果您的实例处于“已停止分配”状态,因为它仍占用计算资源,将对分配的虚拟内核计费,但不对软件许可证本身计费。
假定一个计算实例处于以下状态,其计费情况供您参考:
azure VM的电源状态:
Azure VM 可能会处于多种电源状态之一。 从虚拟机监控程序的角度来看,此状态表示 VM 的当前状态。
电源状态
| 电源状态 | 说明 |
|---|---|
| 正在启动 | 指示正在启动虚拟机。 |
| 正在运行 | 指示虚拟机正在运行。 |
| 正在停止 | 指示正在停止虚拟机。 |
| 已停止 | 指示虚拟机已停止。 虚拟机处于停止状态时仍会产生计算费用。 |
| 正在解除分配 | 指示正在解除分配虚拟机。 |
| 已解除分配 | 指示虚拟机已从虚拟机监控程序中删除,但仍可在控制面板中使用。 处于“已解除分配”状态的虚拟机不会产生计算费用。 |
| - | 指示虚拟机的电源状态未知。 |
您可以在“虚拟机”选项卡和虚拟机仪表板中检查虚拟机的状态。如果虚拟机状态为“已停止”,则仍计费。仅当状态为“已停止(已取消分配)”时才表明虚拟机不再产生费用。例如,如果使用 Windows 中的电源选项停止虚拟机,该虚拟机仍将产生费用;但如果从管理门户停止虚拟机,该虚拟机将不再产生任何费用。
“虚拟机”选项卡中“已停止”和“已停止(已取消分配)”的虚拟机
将收费的“已停止”虚拟机
将不收费的“已停止(已取消分配)”的虚拟机
可见,Azure对停止状态做了更精细的区分,通过不同界面进行的停机操作,效果也并不一样。
以上对比,国外领先厂商对于用户场景与产品功能的匹配上较为精细,而国内厂商还未做到如此精细。
至于原因是商业策略还是暂时的技术限制,暂时不得而知。对于用户场景来说,国外大厂还是领先一步。
公有云厂商如AWS、阿里云和Azure在云主机实例的计费策略上有所不同。AWS的停止实例状态下不收费,但EBS存储按量计费;阿里云即使是停止实例仍会计费;Azure则区分了停止分配和未分配状态,只有未分配时才不计费。用户在选择云服务时需关注不同状态的计费规则。

783

被折叠的 条评论
为什么被折叠?



