Google Cloud Storage Deep Dive
Google Cloud Storage is a fully managed, scalable object storage service in GCP used to store unstructured data such as files, images…
Google Cloud Storage Deep Dive
Google Cloud Storage is a fully managed, scalable object storage service in GCP used to store unstructured data such as files, images, logs, backups, parquet files, CSVs, videos, and ML datasets. It can be regional or dual-region or multi-region as per the requirement.
It is commonly used for:
- data lake storage
- raw ingestion layer
- backups
- staging for BigQuery/Dataflow
Difference between Object, Block, and File Storage

Examples in GCP:
- Object → Cloud Storage
- Block → Persistent Disk
- File → Filestore
So cloud storage is called object storage.
High-Level Architecture -
Cloud storage architecture includes the following:
Buckets → A bucket is a logical container for storing objects. Top-level storage container
- Bucket definition:
- region/location
- storage class
- IAM permissions
- lifecycle rules
- versioning
Folder → Logical naming convention
Objects → data is stored as objects. An object is an individual stored file.
Each object contains:
Ø actual file/data
Ø metadata
Ø unique identifier
Ø Examples: CSV, JSON, Parquet, Images, Logs
Ø Objects are immutable, i.e., once an object is created, it cannot be modified directly. So you cannot modify a file directly. Instead: you can upload new version or overwrite an object.
Distributed backend → automatic scaling
Replication → durability & availability
Metadata management
Key benefits:
- highly durable (11 9’s durability)
- auto-scalable
- serverless
Storage Classes:
There are 4 classes in cloud storage.
- Standard
For:
- frequently accessed data
Examples:
- active analytics
- streaming data
- hot datasets
Low latency, frequent access
2. Nearline
For:
- infrequent access (~monthly)
Examples:
- monthly backups
Cheaper storage and retrieval costs exist.
3. Coldline
For:
- quarterly or rare access
Examples:
- disaster recovery backups
Lower storage cost.
4. Archive
For:
- long-term retention
Examples:
- compliance
- legal data
Cheapest storage, highest retrieval cost.

Example:
Raw logs:
- Day 0–30 → Standard
- Day 30–90 → Nearline
- Day 90–365 → Coldline
- After 1 year → delete/archive
This saves huge costs.
GCS is strongly consistent
Meaning:
- upload immediately visible
- delete immediately visible
Durability vs Availability
Cloud storage provides the following:
- 11 9's durability
- very high availability
Durability ≠ availability.
What is lifecycle management?
Lifecycle management is an automated way to manage objects in Cloud Storage based on rules.
You can:
- move files between storage classes
- archive files
- delete old files automatically
It helps:
- reduce cost
- automate retention
- manage huge-scale storage
Example:
Move logs older than 30 days to Nearline.
Real-world lifecycle example
Suppose an e-commerce company receives transaction logs daily.
Lifecycle policy:
0–30 days → Standard (frequent access)
30–90 days → Nearline
90–365 days → Coldline
After 1 year → delete or archive
This reduces storage cost significantly.
How to reduce storage cost?
Strategies:
- Use appropriate storage class
- Lifecycle rules
- Delete unused files
- Compression (Parquet, Avro)
- Partition data logically
- Avoid duplicate storage
- Retention optimization
Example: Store raw CSV as compressed parquet.
How do you secure cloud storage?
Security layers:
- IAM permissions
- Bucket policies
- Uniform bucket access
- Object-level ACL permissions
- Encryption
- Signed URLs
- Retention policies
- VPC Service Controls
Example: Only data engineering service accounts can write to the productionn bucket.
What is a Signed URL?
A Signed URL provides temporary secure access to private objects without exposing permissions.
Example:
- Share file with vendor
- URL expires after 2 hours
Common use case:
temporary download access
How is data encrypted?
By default: Google encrypts data automatically (at rest).
Encryption options:
- Google-managed keys (default)
- Customer-managed keys (CMEK)
- Customer-supplied keys (CSEK)
Also:
- TLS encryption during transfer
What is object versioning?
Versioning stores multiple versions of objects.
If a file is overwritten:
- old version remains recoverable
Useful for:
- rollback
- accidental deletion recovery
What if someone deletes a file accidentally?
Recovery options:
- Object versioning enabled → restore old version
- Retention policies
- Backup buckets
- Replication copies
Best practice:
Enable versioning for production-critical buckets.
What is retention policy?
A retention policy prevents deletion/modification for a fixed duration.
Example:
Financial records cannot be deleted for 7 years.
Useful for:
- compliance
- legal requirements
How does Cloud Storage scale?
Cloud Storage is automatically distributed.
It scales through:
- distributed backend
- automatic replication
- parallel uploads/downloads
No manual scaling required.
Key benefit:
virtually unlimited scalability.
What are compose operations?
A compose operation combines multiple small objects into one larger object.
Example: 100 log chunks → merge into one parquet file
Benefits:
- fewer files
- better BigQuery performance
- optimized processing
How to Optimize huge files performance?
Strategies:
- parallel uploads
- compression
- split huge files
- use parquet/avro
- proper naming convention
- multipart upload
For analytics:
Use columnar formats like Parquet.
Usecase:Design for 5 TB logs daily
Architecture:
Folder structure:
bucket/raw/year/month/day/ bucket/processed/year/month/day/
Storage strategy:
0–30 days → Standard
30–90 days → Nearline
90+ days → Coldline
Retention:
- delete after 1 year
Optimization:
- parquet compression
- partition by date
Security:
- IAM + service account access
How to handle Late arriving files
Design approach:
- Watermarking
- Retry logic
- Late-arrival window
- Reprocessing pipeline
Example: Allow 2-day delayed ingestion.
Also: Maintain ingestion timestamp.
How would you design a secure data lake in GCS?
Layers:
raw/ trusted/ curated/
Security:
- separate buckets
- IAM role separation
- encryption
- versioning
- retention policy
- audit logging
Example: Analysts only access curated layer.
You accidentally deleted production files. What recovery options exist?
Recovery options:
- Versioning restore
- Backup bucket
- Cross-region replication
- Retention lock
Production best practice:
Versioning + retention enabled.
Production issues in Cloud Storage
Examples:
- Late arriving files
- Duplicate ingestion
- Permission failures
- Small file problem
- Incorrect lifecycle deletion
- Cross-region latency
- Bucket misconfiguration
How does Cloud Storage integrate with BigQuery?
Cloud Storage commonly used as staging.
Flow: Source → GCS → BigQuery Load Job
Supports:
- CSV
- JSON
- Avro
- Parquet
- ORC
Best practice:
Store parquet for faster analytics
How would you move petabyte-scale data into GCP?
Options:
- Online transfer
- Storage Transfer Service
- Offline transfer
- Transfer Appliance
- Streaming pipelines
- Pub/Sub + Dataflow
For PB-scale:
Use the transfer appliance due to network limitations.
메타데이터
- post_id
- 74a4967fef9d
- slug
- google-cloud-storage-deep-dive-74a4967fef9d
- url
- https://medium.com/@leenadalvi3193/google-cloud-storage-deep-dive-74a4967fef9d
- canonical_url
- https://medium.com/@leenadalvi3193/google-cloud-storage-deep-dive-74a4967fef9d
- author_url
- https://medium.com/@leenadalvi3193
- status
- ok
- fetched_at
- 2026-06-15 20:49:13