年底相对闲一些,翻翻AWS DevOps的白皮书,提前为来年做准备,竟然发现其中有很多知识点在做AWS SAP练习题的时候遇到过,正好温故而知新一下,比如下面这道:
A company needs to run a software package that has a license that must be run on the same physical host for the duration of its use. The software package is only going to be used for 90 days. The company requires patching and restarting of all instances every 30 days. How can these requirements be met using AWS?
A. Run a dedicated instance with auto-placement disabled.
B. Run the instance on a dedicated host with Host Affinity set to Host.
C. Run an On-Demand instance with a Reserved Instance to ensure consistent placement.
D. Run the instance on a licensed host with termination set for 90 days.
答案:B
题目难度:低
题目解析:题干中提到,软件仅授权在同一物理机上运行,而且每30天所有的实例会因为打补丁而重启。由此可见,题目其实提出了两项要求:1. 在指定物理硬件上运行实例;2. 实例重启后依然在同一指定硬件上运行。
看到这里,答案已经显而易见,应该在Dedicated Host上运行实例(满足要求1),并设置Host Affinity属性(满足要求2)。
在Dedicated Host上运行实例很好理解,那Host Affinity又是个什么概念呢?我们略微深入地探究一下。
Amazon EC2 Dedicated Hosts的网页上(Dedicated Hosts)可以找到以下信息:
“Affinity allows you to specify which Dedicated Host an instance will run on after it has been stopped and restarted. This gives you the confidence that the instance will run on the same physical server even through planned interruptions, helps reduce licensing costs in scenarios that require license affinity for a period of time (e.g., 90 days), and can be used to maintain an instance placement scheme.”
简单来说,Host Affinity是设置在实例层面的一个参数,确保实例在重启后依然运行在跟之前相同的硬件上。
具体操作步骤,可以参看这里https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html,就不再赘述。
网友评论