The idea
Cloud storage is disk space you rent from a provider and reach over a network. You pay for what you use or reserve, usually per gigabyte per month. It comes in three main kinds: block, file and object storage.
Three kinds
A block volume acts like a hard drive plugged into one server. The operating system formats it and saves files on it in fixed-size pieces called blocks. It is fast, so databases use it. AWS calls it EBS (Elastic Block Store).
A file share is a folder that many servers open at the same time, over a network protocol such as NFS. One server saves a file and another can read it. AWS calls this EFS; Google calls it Filestore.
Object storage keeps whole files, called objects, in a bucket. Each object has a key (its name), the data and metadata (facts about it, like its size). The key menu/latte.jpg looks like a folder path, but the bucket is flat.
One photo in a bucket
Server 1 runs line 4. The boto3 library sends the photo to the bucket over HTTPS as a PUT request, with its key. There is no drive to plug in and no folder to mount: any program with permission can do this.
By default, S3 copies each object into at least three Availability Zones: separate groups of data centres in one region, each with its own power and network. AWS designs S3 for 99.999999999% (eleven nines) yearly durability.
Say Zone A loses power. The copies in Zones B and C still answer, so the photo is neither lost nor out of reach. S3 Standard is designed to keep data safe even if a whole zone is lost.
Line 5 asks for the same bucket and key with a GET request, and the photo comes back as copy.jpg. Server 2 fetches it here: nothing was shared or plugged in, only a name and permission.
Choosing
Use block storage for one server's boot disk or database, file storage for a folder many servers share, and object storage for photos, videos, backups and logs reached by key. Most real apps use more than one.
What happens
;; step 1/9 · storage cloud storage = rented disk space, over a network pay for what you use or reserve (per GB per month) block a drive for one server file a folder many servers share object a bucket of files found by key
Providers name the three kinds differently: AWS EBS, EFS and S3; Google Cloud Persistent Disk (or Hyperdisk), Filestore and Cloud Storage; Azure Disk Storage, Azure Files and Blob Storage. The ideas are the same. Eleven nines is a design target for a year, not a promise that nothing can go wrong. S3 One Zone-IA keeps data in a single zone, so losing that zone can lose the data.