Skip to content

Background

Storage types

Breqwatr Cloud has two kinds of storage: block storage, as volumes that instances use as disks, and object storage, reached over the S3 API. Flavours carry no local disk, so every instance's storage is a volume.

The two kinds

Block storage Object storage (S3)
What you get A volume: a disk that an instance formats and mounts Buckets of objects, read and written over HTTP
Who uses it The instance it's attached to Any application with an access key, from anywhere
Good for Operating systems, databases, application data Backups, static files, logs, data shared between systems
On a traditional platform A virtual disk on the SAN An archive share, or an S3-compatible appliance

Block storage

Block storage is backed by Ceph, a distributed storage system. A volume's data is spread across many disks and servers in the region rather than kept on the host that runs the instance, so a volume doesn't depend on any one instance or host.

Volumes

A volume is a disk of the size you choose. An instance has at least one: its root volume, created from the image at launch. Data volumes are created separately and attached as further disks.

  • Attached to one instance at a time. Detach a volume and attach it to another instance, and its data goes with it.
  • In one region. A volume attaches only to instances in its own region.
  • Grows, never shrinks. Extend a volume to make it larger, then grow the filesystem on it.
  • Outlives its instance. A data volume stays when the instance is deleted, so an instance can be replaced and the data volume attached to the new one.

Keep data on data volumes rather than the root volume. The instance then stays easy to replace, as Pets vs cattle describes, and the data is in one place to snapshot and back up.

Snapshots and backups

Snapshot Backup
What it is The volume at a point in time, kept with it A full copy, held apart from the volume
After the volume is deleted Can't happen: delete the snapshots first Still there
Use it for Rolling back a change Recovering lost data

Restoring either one makes a new volume; the original isn't touched.

Quota and billing

Volumes and snapshots count toward the project's storage quota in each region, and are billed by size, by the hour, whether or not they're attached. An unattached volume or a forgotten snapshot keeps being billed until it's deleted. See the pricing page.

Volumes in Kubernetes

On a BKS cluster, a persistent volume claim becomes a volume in your project, attached to whichever node runs the pod. It belongs to the project, not the cluster. Kubernetes on BKS uses one for its database.

Object storage (S3)

Not yet available

Object storage isn't available on Breqwatr Cloud yet. This section will cover buckets, access keys, endpoints and the S3 tools that work with them once it is.

Object storage keeps data as objects in buckets. An application reads and writes them over HTTP with the S3 API, so the data isn't tied to an instance, and many systems can use the same bucket at once.

Impact

  • There's no local disk: every disk is a volume, and every volume can be detached, moved, snapshotted and backed up.
  • Replacing an instance doesn't mean losing its data, as long as the data is on a data volume.
  • Storage is self-service: you create, grow and delete volumes yourself, through the same API as everything else.

Common anti-patterns

  • Data on the root volume: the instance can't be replaced without moving the data first.
  • Snapshots used as backups: a snapshot is kept with its volume and can't outlast it.
  • Unattached volumes left behind: each one keeps being billed and counts toward quota.
  • Snapshots kept forever: they count toward the storage quota, and a volume can't be deleted while it has any.
  • Reliability: data on volumes that outlast instances, with backups held apart.
  • Spend efficiency: volumes sized for what they hold, and nothing left unattached.
  • Sustainability: storage provisioned for use, not kept just in case.

Further reading