Your company uses Google Kubernetes Engine (GKE) as a platform for all workloads. Your company has a single large GKE cluster that contains batch, stateful, and stateless workloads. The GKE cluster is configured with a single node pool with 200 nodes. Your company needs to reduce the cost of this cluster but does not want to compromise availability. What should you do?
Answer(s): C
Option C is the most suitable solution because it addresses both cost reduction and availability without requiring significant architectural changes. Here's why:Horizontal Pod Autoscaling (HPA): HPA dynamically adjusts the number of pod replicas based on observed CPU utilization or other custom metrics. This ensures that resources are only consumed when needed, leading to cost savings during periods of low demand. By scaling down stateless and compatible stateful workloads during off-peak times, resource waste is minimized. Node Autoscaling: Node autoscaling complements HPA by adding or removing nodes in the cluster based on resource requests. If scaled pods require more resources than the current nodes can provide, the cluster will automatically add new nodes, ensuring availability. Conversely, when demand decreases, nodes can be removed to save costs. This dynamic adjustment keeps resources aligned with the actual requirements of the cluster. Resource Optimization: The combination of HPA and node autoscaling optimizes resource consumption by scaling up or down as needed. This avoids over-provisioning that is common when a fixed number of nodes is always running, thus reducing costs. Availability: By using autoscaling, the cluster is more resilient. During peak usage, the system can expand capacity to meet demand. If nodes fail, node autoscaling can quickly replace them, reducing service disruption. No Architectural Overhaul: Option A involves creating a second cluster, which requires significant architectural changes and management overhead. Option B limits resources, which can negatively affect availability during peak times if limits are too low. Option D makes use of preemptible VMs, which can be reclaimed by GCP and are not suitable for workloads needing high availability.Authoritative Links:Kubernetes Horizontal Pod Autoscaling: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ GKE Node Autoscaling: https://cloud.google.com/kubernetes-engine/docs/how-to/node-autoscaling Best Practices for Running Cost-Effective Applications on Google Kubernetes Engine: https://cloud.google.com/blog/products/containers-kubernetes/best-practices-for-running-cost-effective-applications-on-gke
Your company has a Google Cloud project that uses BigQuery for data warehousing on a pay-per-use basis. You want to monitor queries in real time to discover the most costly queries and which users spend the most. What should you do?
Answer(s): B
Option B is the correct approach because it leverages the power of BigQuery's audit logs and its querying capabilities to provide real-time insights into query costs and user activity.Here's a breakdown:1. Cloud Logging Sink: BigQuery data access logs record detailed information about queries, including the user who executed them, the query's execution time, and the resources consumed. By creating a Cloud Logging sink that exports these logs to another BigQuery dataset (as suggested in option B), we can easily query this raw data. https://cloud.google.com/logging/docs/export 2. BigQuery Querying: Once the logs are in BigQuery, we can use standard SQL queries to analyze the data. This allows us to perform aggregations, filtering, and groupings to discover which queries are most expensive and which users spend the most on queries. We can calculate the cost based on the processing time and other resources consumed by each query, and group that data by the user that initiated the query. https://cloud.google.com/bigquery/docs/querying-dataOption A is incorrect because while labels can be used, they would not automatically track the cost of queries on a per-user basis; labels are useful for resource grouping and management. Filtering by user in the billing page is useful for cost analysis, but it doesn't provide the detailed query-level visibility the question is asking for.Option C is incorrect because using Dataflow for cost analysis when the raw data is already within BigQuery is less efficient and adds unnecessary complexity. While Dataflow is useful, it's an overkill for the requirements. Also Dataflow will require additional costs and complexity.Option D is incorrect because while billing export to BigQuery provides a breakdown of overall costs by service and project, it doesn’t provide detailed information on individual BigQuery queries and the users that generated them. It will not allow to determine which exact query is more costly and which user spends more on the queries.Therefore, option B offers the most direct and efficient way to gain the required insights by leveraging logging data and BigQuery's native analytical capabilities. It allows near real-time insights into query costs, split by user, by using the generated logs from the Cloud Logging sink exported into BigQuery.
Your company and one of its partners each have a Google Cloud project in separate organizations. Your company's project (prj-a) runs in Virtual Private Cloud (vpc-a). The partner's project (prj-b) runs in vpc-b. There are two instances running on vpc-a and one instance running on vpc-b. Subnets defined in both VPCs are not overlapping. You need to ensure that all instances communicate with each other via internal IPs, minimizing latency and maximizing throughput. What should you do?
Answer(s): A
The correct answer is A. Set up a network peering between vpc-a and vpc-b.Here's why:Network peering allows direct, private communication between Virtual Private Clouds (VPCs) in Google Cloud. This establishes a secure, low-latency connection using Google's internal network. Since the subnets are non-overlapping, peering is a feasible and optimal solution. This method avoids the overhead and complexities associated with other options, like VPNs.By peering vpc-a and vpc-b, instances in both projects can communicate using their internal IP addresses. This satisfies the requirements of minimizing latency and maximizing throughput, as traffic doesn't need to traverse the public internet. There are no extra costs associated with egress traffic to the public internet. Peering offers a scalable approach for inter-VPC communication.Option B, using Cloud VPN, introduces the overhead of encryption and decryption, increasing latency and potentially reducing throughput compared to peering. While VPNs are useful for connecting to on-premise networks, peering is better suited for VPC-to-VPC communication within Google Cloud.Option C, employing IAP TCP forwarding, is designed to provide secure access to instances via the public internet and is unsuitable for direct internal IP communication between VPCs. It's also more complex and less efficient than peering for this use case.Option D, using OpenVPN, involves manual setup, management overhead, and the potential for configuration errors. Furthermore, relying on two new instances just for networking adds unnecessary complexity, and OpenVPN itself is a resource-intensive option compared to the native peering option.In summary, VPC peering is the most straightforward, efficient, and scalable solution to enable low-latency, high-throughput communication between instances residing in separate Google Cloud VPCs with non-overlapping subnets.Authoritative Links:VPC Network Peering Overview: https://cloud.google.com/vpc/docs/vpc-peering Comparing Peering with VPNs: https://cloud.google.com/vpc/docs/choose-vpc-peering-vpn IAP TCP Forwarding: https://cloud.google.com/iap/docs/tcp-forwarding-howto
You want to store critical business information in Cloud Storage buckets. The information is regularly changed, but previous versions need to be referenced on a regular basis. You want to ensure that there is a record of all changes to any information in these buckets. You want to ensure that accidental edits or deletions can be easily rolled back. Which feature should you enable?
The correct answer is B. Object Versioning . Object Versioning in Google Cloud Storage is specifically designed to address the need to retain previous versions of objects, making it ideal for scenarios where data is regularly changed and rollbacks are necessary. When enabled, every time an object is overwritten or deleted, Cloud Storage creates a new version of the object, preserving the previous state. This ensures a historical record of all changes. Bucket Lock, while important for compliance, prevents modifications once enabled and isn't for regular rollbacks. Object change notification alerts you to changes but doesn't store previous versions. Object Lifecycle Management automates object deletion or storage class changes and isn't meant for version history. Therefore, Object Versioning perfectly fulfills the requirements of tracking all changes,referencing past states, and easily rolling back accidental edits or deletions.Authoritative links for further research:Google Cloud Storage Object Versioning documentation: https://cloud.google.com/storage/docs/object-versioning Overview of Cloud Storage Features: https://cloud.google.com/storage/docs/overview
You have a Compute Engine application that you want to autoscale when total memory usage exceeds 80%. You have installed the Cloud Monitoring agent and configured the autoscaling policy as follows: ✑ Metric identifier: agent.googleapis.com/memory/percent_used ✑ Filter: metric.label.state = 'used' ✑ Target utilization level: 80 ✑ Target type: GAUGE You observe that the application does not scale under high load. You want to resolve this. What should you do?
C is correct answer:A: Change the Target type to DELTA_PER_MINUTE. (in this case the utlization tagret need to be in minutes which is not the case its percentage % and not time based.B: Change the Metric identifier to agent.googleapis.com/memory/bytes_used. (not applicable)C: Change the filter to metric.label.state = 'used' AND metric.label.state = 'buffered' AND metric.label.state = 'cached' AND metric.label.state = 'slab'. (this gives total memory used)D: Change the filter to metric.label.state = 'free' and the Target utilization to 20. (you would still need to change the the percent_used to percent_free)https://stackoverflow.com/questions/69267526/what-is-disk-data-cached-in-the-memory-usage-chart-metrics-of-gcp-compute-in https://cloud.google.com/compute/docs/autoscaler/scaling-cloud-monitoring-metrics
Post your Comments and Discuss Google Google Cloud Architect Professional exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the Google Cloud Architect Professional content, but please register or login to continue.