GOOGLE-PROFESSIONAL-CLOUD-DEVELOPER practice question 4 of 35

You plan to make a simple HTML application available on the internet. This site keeps information about FAQs for your application. The application is static and contains images, HTML, CSS, and Javascript. You want to make this application available on the internet with as few steps as possible. What should you do?

Full set: 265 questions
Answer options
A: Upload your application to Cloud Storage. Correct answer
B: Upload your application to an App Engine environment.
C: Create a Compute Engine instance with Apache web server installed. Configure Apache web server to host the application.
D: Containerize your application first. Deploy this container to Google Kubernetes Engine (GKE) and assign an external IP address to the GKE pod hosting the application.
Correct Answer:
A. Upload your application to Cloud Storage.
Explanation

Google Cloud Storage is designed to store and serve object data, which includes static files like HTML, CSS, JavaScript, and images. It offers a feature to host a static website directly from a storage bucket. This method is the most straightforward and requires the fewest steps: create a bucket, upload the files, and configure public access. This approach is serverless, highly scalable, and cost-effective for static content, perfectly aligning with the requirement for a simple deployment with minimal effort.

Why Incorrect

B. Upload your application to an App Engine environment. App Engine is a Platform-as-a-Service (PaaS) intended for applications with server-side logic. While it can serve static files, it requires more configuration (e.g., app.yaml) and is overkill for a purely static site.
C. Create a Compute Engine instance with Apache web server installed. Configure Apache web server to host the application. This Infrastructure-as-a-Service (IaaS) approach requires manual server provisioning, software installation, configuration, and ongoing maintenance, making it significantly more complex than using Cloud Storage.
D. Containerize your application first. Deploy this container to Google Kubernetes Engine (GKE) and assign an external IP address to the GKE pod hosting the application. This is the most complex option, involving containerization, cluster management, and Kubernetes configurations. GKE is designed for orchestrating containerized applications at scale, not for simple static website hosting.

References

1. Google Cloud Documentation - Hosting a static website: "You can host a static website on Cloud Storage. This allows you to serve content such as HTML, CSS, and JavaScript directly from a Cloud Storage bucket." The document outlines the simple three-step process: create a bucket, upload your site's content, and configure public access. (See section: "Hosting a static website").

2. Google Cloud Documentation - Choosing a computing option: This guide compares various Google Cloud services. For static web content, Cloud Storage is the recommended and simplest solution. App Engine, GKE, and Compute Engine are presented as solutions for dynamic applications, containers, and virtual machines, respectively, highlighting their unnecessary complexity for this scenario. (See the comparison table under "Choosing the right solution").

3. Google Cloud Documentation - App Engine - Serving Static Files: This page details the requirement of an app.yaml configuration file to specify handlers for static files. This confirms that deploying to App Engine involves more configuration steps than simply uploading files to a Cloud Storage bucket. (See section: "Configuring your app.yaml file").

Scroll to Top