nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #355

You are developing a short-term image hosting service where end users around the world can upload images that are up to 20MB, and the images will be automatically deleted after 10 days. You need to de

The correct answer is A. Write the image to a Cloud Storage bucket. Create a lifecycle configuration that deletes objects. Cloud Storage is a cost-effective solution for storing large objects like images, especially for short-term storage. By configuring a lifecycle policy, you can automatically delete objects after 10 days, aligning perfectly with your requirement to remove images after that period.

Implementing Data Storage Solutions

Question

You are developing a short-term image hosting service where end users around the world can upload images that are up to 20MB, and the images will be automatically deleted after 10 days. You need to determine how the images should be stored while minimizing cost. How should you store the images?

Options

  • AWrite the image to a Cloud Storage bucket. Create a lifecycle configuration that deletes objects
  • BWrite the images to Spanner. Configure a row deletion policy on the table that deletes rows 10
  • CWrite the images to Firestore. Deploy a Cloud Scheduler-invoked Cloud Run service that queries
  • DWrite the images to Bigtable. Configure a garbage collection policy for the column family that

How the community answered

(71 responses)
  • A
    75% (53)
  • B
    13% (9)
  • C
    4% (3)
  • D
    8% (6)

Explanation

Cloud Storage is a cost-effective solution for storing large objects like images, especially for short-term storage. By configuring a lifecycle policy, you can automatically delete objects after 10 days, aligning perfectly with your requirement to remove images after that period. This approach minimizes cost by avoiding the need for active management or scheduled deletion processes. Using Spanner, Firestore, or Bigtable would generally be more expensive and less optimal for storing large files like images, as these services are better suited for structured or semi-structured data rather than binary objects (such as images).

Topics

#Cloud Storage#Lifecycle Management#Cost Optimization#Object Storage

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice