谷歌助理云工程师(ACE)考试真题(41-60)

Question 41

You have 32 GB of data in a single file that you need to upload to a Nearline Storage bucket. The WAN connection you are using is rated at 1 Gbps, and you are the only one on the connection. You want to use as much of the rated 1 Gbps as possible to transfer the file rapidly. How should you upload the file?

A. Use the GCP Console to transfer the file instead of gsutil.

B. Enable parallel composite uploads using gsutil on the file transfer.

C. Decrease the TCP window size on the machine initiating the transfer.

D. Change the storage class of the bucket from Nearline to Multi-Regional.

你有 32GB 的数据在一个文件中,你需要上传到一个 Nearline 存储 bucket。你使用的广域网连接的额定速度是 1Gbps,而且你是连接上唯一的人。你想尽可能多地使用额定的 1Gbps 来快速传输文件。你应该怎样上传文件?

A. 使用GCP控制台而不是gsutil来传输文件。

B. 在文件传输上使用 gsutil 启用并行复合上传。

C. 减少发起传输的机器上的TCP窗口大小。

D. 将 bucket 的存储类别从 Nearline 改为Multi-Regional。

正确答案: 

B

参考:

Correct answer is B as the bandwidth is good and its a single file, gsutil parallel composite uploads can be used to split the large file and upload in parallel.(正确答案是B,因为带宽好而且是单个文件,可以使用gsutil并行复合上传来拆分大文件并行上传)

gsutil 是一个 Python 应用,该应用可让您通过命令行访问 Cloud Storage。您可以使用 gsutil 完成各种各样的存储分区和对象管理任务,包括:

创建和删除存储分区。

上传、下载和删除对象。

列出存储分区和对象。

移动、复制和重命名对象。

修改对象和存储分区 ACL。

Question 42

You’ve deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below:

You need to refactor(重构) this configuration so that the database password is not stored in plain text. You want to follow Google-recommended practices. What should you do?

A. Store the database password inside the Docker image of the container, not in the YAML file.

B. Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.

C. Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.

D. Store the database password in a file inside a Kubernetes persistent volume, and use a persistent volume claim to mount the volume to the container.

你已经使用下面指定的 YAML 文件将一个名为 myapp1 的微服务部署到 Google Kubernetes Engine 集群上。

/图片/

你需要重构这个配置,使数据库密码不以纯文本形式存储。你想遵循谷歌推荐的做法。你应该怎么做?

A. 将数据库密码存储在容器的 Docker 镜像中,而不是 YAML 文件中。

B. 将数据库密码存储在一个 Secret 对象中。修改 YAML 文件,从 Secret 中填入 DB_PASSWORD 环境变量。

C. 将数据库密码存储在 ConfigMap 对象中。修改 YAML 文件以从 ConfigMap 中填充 DB_PASSWORD 环境变量。

D. 将数据库密码存储在 Kubernetes 持久化卷内的一个文件中,并使用持久化卷要求将该卷挂载到容器中

正确答案:

B

参考:

Secret是什么?

Secret 是用于存储集群中的密码、OAuth 令牌和 SSH 密钥等敏感数据的安全对象。将敏感数据存储在 Secret 中比存储在明文 ConfigMap 或 Pod 规范中更加安全。使用 Secret 可以控制敏感数据的用途,并降低将数据暴露给未授权用户的风险

Question 43

ou are running an application on multiple virtual machines within a managed instance group and have autoscaling enabled. The autoscaling policy is configured so that additional instances are added to the group if the CPU utilization of instances goes above 80%. VMs are added until the instance group reaches its maximum limit of five VMs or until CPU utilization of instances lowers to 80%. The initial delay for HTTP health checks against(针对) the instances is set to 30 seconds.The virtual machine instances take around three minutes to become available for users. You observe that when the instance group autoscales, it adds more instances then necessary to support the levels of end-user(终端用户) traffic(流量). You want to properly maintain instance group sizes when autoscaling. What should you do?

A. Set the maximum number of instances to 1.

B. Decrease the maximum number of instances to 3.

C. Use a TCP health check instead of an HTTP health check.

D. Increase the initial delay of the HTTP health check to 200 seconds.

你在一个受管实例组内的多个虚拟机上运行一个应用程序,并启用了自动缩放功能。自动缩放策略被配置为:如果实例的CPU利用率超过80%,则向该组添加额外的实例。虚拟机被添加到实例组中,直到实例组达到5台虚拟机的最大限制,或者直到实例的CPU利用率降低到80%。针对实例的HTTP健康检查的初始延迟被设置为30秒。 虚拟机实例需要三分钟左右才能供用户使用。你观察到,当实例组自动扩展时,它增加了更多的实例来支持终端用户的流量水平。你想在自动扩展时正确地保持实例组的大小。你应该怎么做?

A. 将实例的最大数量设置为 1。

B. 将最大实例数减少到3。

C. 使用TCP健康检查而不是HTTP健康检查。

D. 将HTTP健康检查的初始延迟增加到200秒。

正确答案: 

D

参考:

By increasing the initial delay to 200s, VMs will boot properly before being checked; instead of judging them "unhealthy" after only 20s(通过将初始延迟增加到200s, vm将在检查之前正常启动;而不是在他们20s时就认为他们“不健康”)

The reason is that when you do health check, you want the VM to be working. Do the first check after initial setup time of 3 mins = 180 s < 200 s is reasonable

什么是 Instance groups 

An instance group is a collection of virtual machine (VM) instances that you can manage as a single entity(实体).

Compute Engine offers two kinds of VM instance groups, managed and unmanaged:

Managed instance groups (MIGs) let you operate apps on multiple identical VMs. You can make your workloads(工作负载) scalable and highly available by taking advantage of automated MIG services, including: autoscaling, autohealing, regional (multiple zone) deployment, and automatic updating.

Unmanaged instance groups let you load balance across a fleet of VMs that you manage yourself.

实例组 

实例组是可以作为单个实体进行管理的虚拟机 (VM) 实例的集合。

Compute Engine 提供了两种虚拟机实例组,即托管实例组和非托管实例组:

托管实例组 (MIG) 可让您在多个相同的虚拟机上运行应用。您可以利用自动化 MIG 服务让您的工作负载具有可扩缩性和高可用性,这些服务包括自动扩缩、自动修复、区域(多地区)部署和自动更新。

非托管实例组可让您跨一组自行管理的虚拟机实现负载平衡

关于容器的健康检查:Health Check 是可以从业务层面检查状态, Health Check 可以是任何一个单独的命令,Docker 会在容器中执行该命令,如果返回 0,容器被认为是 healthy,如果返回 1,则为 unhealthy。

Question 44

You need to select and configure compute resources for a set of batch processing jobs. These jobs take around 2 hours to complete and are run nightly. You want to minimize service costs. What should you do?

A. Select Google Kubernetes Engine. Use a single-node cluster with a small instance type.

B. Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.

C. Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.

D. Select Compute Engine. Use VM instance types that support micro bursting.

你需要为一组批处理作业选择和配置计算资源。这些工作需要大约2小时完成,并且每晚都要运行。你想尽量减少服务成本。你应该怎么做?

A. 选择 Google Kubernetes Engine。使用一个小实例类型的单节点集群。

B. 选择 Google Kubernetes Engine。使用一个具有微型实例类型的三节点集群。

C. 选择 Compute Engine。使用适当的标准机器类型的可抢占的虚拟机实例。

D. 选择 Compute Engine。使用支持微爆的虚拟机实例类型。

正确答案:

C

参考:

When you see compute engine->cost-effective-> you can strongly go ahead with preemptible

Reduce cost is the keyword so pre-emptible is the best option... C

Preemptible VM instan

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值