Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 212 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 212
Topic #: 1
[All Professional Cloud Developer Questions]

You are responsible for deploying a new API. That API will have three different URL paths:

• https://yourcompany.com/students
• https://yourcompany.com/teachers
• https://yourcompany.com/classes

You need to configure each API URL path to invoke a different function in your code. What should you do?

  • A. Create one Cloud Function as a backend service exposed using an HTTPS load balancer.
  • B. Create three Cloud Functions exposed directly.
  • C. Create one Cloud Function exposed directly.
  • D. Create three Cloud Functions as three backend services exposed using an HTTPS load balancer.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
info_appsatori
1 month ago
Selected Answer: D
Option D is correct. You need loadbalancer and dns to name your 3 services (yourcompany.com/path). without it, if you select answer B, you will have cloudFunctionName-1/path, cloudFunctionName-2/path, cloudFunctionName-3/path. Its ruined user experience.
upvoted 1 times
...
phantomsg
8 months, 1 week ago
Selected Answer: B
There's no purpose for a Load Balancer here as you are not balancing traffic across multiple backend server instances. You need 3 different Cloud Functions each with their own Endpoint that's all. See this example: https://cloud.google.com/functions/docs/create-deploy-gcloud-1st-gen
upvoted 1 times
...
ka219ra
9 months ago
Selected Answer: D
option D. When users query "yourcompany.com," they receive an IP address and access the load balancer. Consequently, the load balancer then executes path-based routing. B is Wrong. It is not possible to deploy three cloud functions with the same domain name.
upvoted 3 times
...
Kadhem
11 months ago
Selected Answer: B
i go for B because i don't understand the necessity of LB in this case
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: B
I go with B. Exposed using an HTTPS load balancer is not required. Those three are different end points of the service. We no need to setup load balancer in case of Cloud functions, it is serverless.
upvoted 1 times
...
zanhsieh
1 year, 5 months ago
Selected Answer: D
D. The differences between B and D are: 1. Cost: 3 Cloud Function exposed directly (B) will create 3 endpoints / load balancers, whereas D only exposed one load balancer. 2. Scalability: exposing directly with endpoint or instance itself would cause scalability problem - can't upscale the endpoint instance fast enough. 3. Handling service-to-service call: In B, all services rely on external DNS resolution, which is slower. In D, it has chance that cross-service call can be resolved internally.
upvoted 2 times
...
Teraflow
1 year, 7 months ago
Selected Answer: B
Option B (Create three Cloud Functions exposed directly) is the best choice in this scenario, as it allows you to create a separate Cloud Function for each API URL path and configure each one to invoke a different function in your code. Option A (Create one Cloud Function as a backend service exposed using an HTTPS load balancer) and Option D (Create three Cloud Functions as three backend services exposed using an HTTPS load balancer) both involve using an HTTPS load balancer, which adds additional complexity and configuration overhead. These options may be appropriate for more complex scenarios, but in this case, they are not necessary. Option C (Create one Cloud Function exposed directly) would require all three API URL paths to invoke the same function in your code, which does not meet the requirement of invoking different functions for each URL path.
upvoted 1 times
closer89
1 year, 7 months ago
B is wrong, in API context you need to map each external url to cloud function url, to do that you need LB
upvoted 1 times
...
...
Pime13
1 year, 9 months ago
Selected Answer: D
i choose D
upvoted 1 times
Pime13
1 year, 8 months ago
https://cloud.google.com/load-balancing/docs/https/setting-up-https-serverless https://cloud.google.com/load-balancing/docs/negs/serverless-neg-concepts
upvoted 1 times
...
...
mrvergara
1 year, 9 months ago
Selected Answer: B
Each function is defined as an HTTP trigger, which allows it to be triggered by incoming HTTP requests. The endpoint for each function is defined in the function name (e.g. "students", "teachers", "classes"). This means that the APIs would be accessible at the following endpoints: • https://yourcompany.com/students • https://yourcompany.com/teachers • https://yourcompany.com/classes Note that you would need to configure "yourcompany.com" DNS registry. In this case, option B, "Create three Cloud Functions exposed directly", would be correct.
upvoted 3 times
mrvergara
1 year, 9 months ago
Using option D, where you create three Cloud Functions as backend services exposed through an HTTPS load balancer, is not necessary in this scenario. An HTTPS load balancer would be useful in scenarios where you need to balance incoming traffic across multiple instances of a backend service to distribute the workload, ensure high availability, and provide failover protection. However, in this case, you only need to map each API URL path to a different function, which can be achieved by creating three separate Cloud Functions, each exposed directly. This would be a simpler and more straightforward solution for this specific use case.
upvoted 1 times
...
...
mrvergara
1 year, 10 months ago
Why there is the need of LB?
upvoted 1 times
...
sharath25
1 year, 11 months ago
Selected Answer: D
option D
upvoted 1 times
...
zellck
1 year, 11 months ago
Selected Answer: D
D is the answer.
upvoted 1 times
zellck
1 year, 11 months ago
https://cloud.google.com/load-balancing/docs/https/setup-global-ext-https-serverless
upvoted 2 times
...
...
melisargh
1 year, 11 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...