Exam Professional Cloud Developer All QuestionsBrowse all questions from this exam
Question 111

You manage an application that runs in a Compute Engine instance. You also have multiple backend services executing in stand-alone Docker containers running in Compute Engine instances. The Compute Engine instances supporting the backend services are scaled by managed instance groups in multiple regions. You want your calling application to be loosely coupled. You need to be able to invoke distinct service implementations that are chosen based on the value of an HTTP header found in the request. Which Google Cloud feature should you use to invoke the backend services?

    Correct Answer: A

    Traffic Director is designed for advanced traffic management across multiple regions and zones, making it ideal for services that need to be loosely coupled. It allows you to configure routing rules based on various criteria, including HTTP headers, which matches the requirement to invoke distinct service implementations based on the value of an HTTP header found in the request. It supports routing traffic to specific service endpoints rather than just to Compute Engine instances, ensuring that the appropriate backend services are called based on the header values.

Discussion
GoReplyGCPExamOption: A

"the backend services are scaled by managed instance groups in multiple regions", the Internal load balancer is a regional service, so It's A in my opinion. - "An internal HTTP(S) load balancer routes internal traffic to the service running on the VM. Traffic Director works with Cloud Load Balancing to provide a managed ingress experience. You set up an external or internal load balancer, and then configure that load balancer to send traffic to your microservices."

akshaychavan7Option: A

I believe, it should be A.

akshaychavan7

I went through the link shared by Blueocean, and also the Google documentation for Traffic Director, and I feel the correct answer should be option A. Here's my take on this - HTTP(s) load balancer does allow the option of Traffic Steering which identifies the header values and based on that it directs the traffic. But, here it is important to note that the traffic is directed to the specific Compute Engine instance and not to the service endpoint! On the other hand, Traffic Director also allows Traffic Steering which directs the traffic based on header values to the specific service endpoint, which is what is needed in the above scenario. It also supports the point of loosely coupled services. Sources - https://cloud.google.com/traffic-director https://cloud.google.com/traffic-director/docs/features

akshaychavan7

Here's what the documentation says, 'Traffic Director supports advanced request routing features like traffic splitting, enabling use cases like canarying, url rewrites/redirects, fault injection, traffic mirroring, and advanced routing capabilities based on various header values, including cookies. Traffic Director also supports many advanced traffic policies with the inclusion of many load-balancing schemes, circuit breaking, and backend outlier detections.' Also, in the above question, there's a statement specifying the need for the application to be loosely coupled. To support this point, I found out one line on the Traffic Director's documentation which goes like this, 'This separation of application logic from networking logic lets you improve your development velocity, increase service availability, and introduce modern DevOps practices to your organization.'

ParagSanyashivOption: D

Agree with D

purushiOption: A

I go for A: Traffic director is used to direct the traffic to services running in the different regions or within a region based on the HTTP header values.

zellckOption: D

D is the answer. https://cloud.google.com/load-balancing/docs/l7-internal/traffic-management Internal HTTP(S) Load Balancing supports advanced traffic management functionality that enables you to use the following features: - Traffic steering. Intelligently route traffic based on HTTP(S) parameters (for example, host, path, headers, and other request parameters).

tomato123Option: A

I think A is correct

BlueoceanOption: D

Agree with Option D https://cloud.google.com/load-balancing/docs/l7-internal/traffic-management

thewalkerOption: A

Traffic Director: Traffic Director is a Google Cloud service designed for advanced traffic management across multiple regions and zones. It allows you to route traffic based on various criteria, including HTTP headers. This makes it ideal for loosely coupled applications where you want to dynamically choose backend services based on request attributes. How Traffic Director Works: Routing Rules: You define routing rules in Traffic Director that specify how traffic should be directed based on HTTP headers, path patterns, or other criteria. Backend Services: You associate backend services with your routing rules. These backend services can be managed instance groups, network endpoint groups (NEGs), or other supported backends. Traffic Distribution: When a request arrives, Traffic Director evaluates the routing rules and directs the traffic to the appropriate backend service based on the matching criteria.

thewalker

Let's look at why the other options are less ideal: B. Service Directory: Service Directory is primarily used for service discovery, allowing applications to find and connect to services within a cluster or across multiple clusters. While it can be used for routing, it's not as robust as Traffic Director for advanced traffic management. C. Anthos Service Mesh: Anthos Service Mesh is a powerful service mesh solution that provides features like traffic management, security, and observability. However, it's typically used for microservices running in Kubernetes environments, not for stand-alone Docker containers in Compute Engine. D. Internal HTTP(S) Load Balancing: Internal Load Balancing is designed for routing traffic within a VPC network. While it can handle basic routing, it doesn't offer the advanced features and flexibility of Traffic Director for dynamic routing based on HTTP headers.

alpha_canaryOption: A

https://cloud.google.com/traffic-director/docs/overview#traffic_management:~:text=Advanced%20traffic%20management%2C%20including%20routing%20and%20request%20manipulation%20(based%20on%20hostname%2C%20path%2C%20headers%2C%20cookies%2C%20and%20more)%2C%20enables%20you%20to%20determine%20how%20traffic%20flows%20between%20your%20services

braskaOption: C

Anthos Service Mesh is a service mesh solution that can be used to invoke distinct service implementations based on the value of an HTTP header in the request. It provides a platform-agnostic way to connect, manage, and secure microservices running on Google Cloud or other environments

RajanOption: A

Traffic Director is a Google Cloud feature that provides a global traffic management control plane for service mesh architectures. It allows you to configure and manage traffic routing across multiple services and environments.

jnasOption: A

A as its the only one that let's you router based on headers

closer89Option: A

https://cloud.google.com/traffic-director/docs/overview#traffic_management Advanced traffic management, including routing and request manipulation (based on hostname, path, headers, cookies, and more), enables you to determine how traffic flows between your services. You can also apply actions like retries, redirects, and weight-based traffic splitting for canary deployments. Advanced patterns like fault injection, traffic mirroring, and outlier detection enable DevOps use cases that improve your resiliency.

Pime13Option: A

A: https://cloud.google.com/traffic-director/docs/set-up-gce-vms

omermahgoubOption: A

Traffic Director provides global traffic management for service meshes and hybrid deployments. It allows you to configure routing rules based on the values of HTTP headers, so you can direct traffic to different service implementations based on the value of an HTTP header found in the request. With Traffic Director, you can route traffic to different services running in different regions, and it also supports automatic failover, so you can ensure high availability for your backend services. In your case, you can configure Traffic Director to inspect the value of an HTTP header in the request, and then route the traffic to the appropriate service implementation running in different regions. This allows your application to invoke the backend services in a loosely coupled way, and ensures that the backend services can scale independently of the calling application.

omermahgoub

It also works with MIGs to allow you to manage the scaling of the backend services in different regions, and the combination of Traffic Director and MIG allow you to provide service availability in multiple regions.

omermahgoub

Option D, Internal HTTP(S) Load Balancing, is a feature that allows you to distribute incoming traffic to a group of instances in a Virtual Private Cloud (VPC) network. It works by creating a load balancer, and configuring it to forward traffic to the instances that you specify. This feature is useful for situations where you want to distribute traffic to multiple instances running in the same region. However, in this scenario where you want to invoke distinct service implementations that are chosen based on the value of an HTTP header found in the request. The Internal HTTP(S) Load Balancer doesn't offer this type of feature. It typically directs traffic based on the IP or hostname and port, but it's not capable of inspecting the value of an HTTP header like Traffic Director does.

omermahgoub

Therefore, Traffic Director would be a better choice for this scenario as it allows for more complex and fine-grained traffic management, with the capability to inspect the value of an HTTP header and route the traffic to the appropriate service implementation.

closer89

do not post chatgpt answers!