You must route three URL paths (/students, /teachers, /classes) so each invokes a different function. How should you configure Cloud Functions and the frontend?
Choose an answer
Tap an option to check your answer.
Correct answer: Create three Cloud Functions and register each as a backend service behind an HTTPS load balancer, routing paths to the appropriate backend..
Why this is the answer
The correct approach is to create three separate Cloud Functions, one for each path, and then use an HTTPS load balancer to route incoming requests to the appropriate function based on the URL path. This allows for independent development, deployment, and scaling of each function, aligning with microservices principles. Creating a single Cloud Function as a backend service with an HTTPS load balancer would require the single function to handle all path-based routing logic, which is less efficient and harder to maintain. Exposing three Cloud Functions directly (each with its own HTTPS trigger) would mean three distinct URLs, not a single entry point with path-based routing. Creating a single Cloud Function exposed directly to handle all paths would also require internal routing logic and limit scalability and maintainability.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed