
Answer-first summary for fast verification
Answer: Change the application to create signed URLs for Cloud Storage. Transfer these signed URLs to the client application to upload images to Cloud Storage.
The correct answer is B. Using signed URLs for Cloud Storage allows clients to upload images directly to Cloud Storage without proxying through the application server. This minimizes infrastructure operations overhead by leveraging Google Cloud Storage's managed service, which handles scalability, durability, and availability. Option A is incorrect because storing large files in a database is inefficient and increases database load. Option C introduces operational overhead with a web server and file store management. Option D is not scalable (creating a bucket per user is impractical) and poses security risks by transferring service account credentials.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing a social media application and need to implement a feature for users to upload images ranging from 2 MB to 1 GB in size. How can you minimize infrastructure operations overhead for this functionality?
A
Change the application to accept images directly and store them in the database that stores other user information.
B
Change the application to create signed URLs for Cloud Storage. Transfer these signed URLs to the client application to upload images to Cloud Storage.
C
Set up a web server on GCP to accept user images and create a file store to keep uploaded files. Change the application to retrieve images from the file store.
D
Create a separate bucket for each user in Cloud Storage. Assign a separate service account to allow write access on each bucket. Transfer service account credentials to the client application based on user information. The application uses this service account to upload images to Cloud Storage.
No comments yet.