Home Blog Projects Tags About Friends

The Difference Between File Storage and Object Storage

A frequently asked and ever-relevant topic.

· 3 min read

🧱 Architectural Comparison: File Systems (ext4 + POSIX) vs. Object Storage (TOS + S3 API)

In the evolution of storage architecture, different storage methods correspond to distinct system implementations and protocol access layers. The following diagram illustrates their hierarchical relationships:

                 🧠 Application Layer (App/Service/Framework)

          File Access Interface (POSIX) | Object Access Interface (S3 API)

	  ┌─────────────────────┬───────────────────────┐
	  │ File System (ext4/xfs) │   Object Storage (TOS, etc.)  │
	  └─────────────────────┴───────────────────────┘

                  Storage Media (HDD/SSD/Distributed Disk)

Core Insight: File storage and object storage are two distinct access models, but at the architectural level, they serve as parallel “data access methods.”


🔍 Comparative Analysis: File Storage vs. Object Storage

DimensionFile StorageObject Storage
Access MethodPOSIX API (e.g., open/read/write)HTTP API (e.g., PUT/GET), S3 API
IntegrationUsed via “mounting” directoriesUpload/download via API calls
Path IdentificationFile path (e.g., /mnt/data/xxx.txt)Bucket/Key (e.g., my-bucket/folder/xxx.txt)
MetadataSystem-defined (filename, size, permissions, etc.)Customizable metadata, tags, etc.
Use CaseLocal storage, low-latency read/writeMassive data storage, backups, large files, multimedia
ScalabilityLimited by single-machine disk capacityCloud-native architecture, near-infinite scalability
ConsistencyStrong consistencyUsually eventual consistency (Note: TOS supports strong consistency)

💡 Core Summary

File storage is better suited for local structured file access, while object storage (such as TOS) provides a cloud-native storage solution based on HTTP interfaces, designed for massive data scale.

Analogy:

  • ext4/xfs: Like “carving” directly onto a disk, emphasizing strong locality and block structure.
  • TOS/S3: Like encapsulating files as objects and hosting them in the cloud via APIs, emphasizing distribution and high reliability.

🎯 Advanced: Can Object Storage Be Operated Like a File System?

The answer is yes. Through specific compatibility layers, object storage can be “file-systemized”:

  • Tool Support: TOS provides SDKs, CLI tools, and mounting utilities (e.g., s3fs).
  • Mounting Solutions: You can mount an object storage bucket to a local directory using mountpoint or similar tools. However, note that this essentially simulates file system behavior, and performance may differ from a native file system.

📌 Scenario Selection Guide

ScenarioRecommended: ext4/xfsRecommended: S3 API / TOS
Frequent Log Writing✅ (Low latency, ideal for local writes)❌ (Not optimized for frequent small random writes)
User Video Upload/Download❌ (Not suitable for massive large-file storage)✅ (TOS is optimized for large object storage)
Big Data Platform Intermediate Data✅ (e.g., HDFS/ext4/xfs)✅ (Suitable for archiving cold data to TOS)
CDN Origin Source✅ (TOS as origin, best paired with caching)
All Posts