# Storage locations

Where a bucket's objects are stored (a zone chosen at creation, or on request storage of your organization's own) and how each behaves when something fails.

## Zones

A bucket's objects are stored in one zone, chosen when the bucket is created and fixed after that:

| Zone   | Location                                                                 |
| ------ | ------------------------------------------------------------------------ |
| `de1a` | Falkenstein (the default)                                                |
| `de1b` | Nuremberg                                                                |
| `fi1a` | Helsinki, Finland: in the EU, outside Germany, only when allowed (below) |

`fi1a` is offered only when an administrator has turned on **Allow EU locations outside Germany**
under **Settings** → **Data location**. Without it, creating a bucket there is refused with `403`,
and a replication rule that would copy from Germany into a Helsinki bucket with `400`. The console
marks such a bucket **outside Germany · Finland**.

Every bucket is reached at the same endpoint whatever its zone; `GetBucketLocation` answers the
zone. Put a bucket in the zone of the instances that read it. To keep data through the loss of a
whole zone, replicate the bucket to one in the other zone (see
[Replicate a bucket](replicate-a-bucket.md)).

## Own storage

On request, Deutsche Cloud puts an organization's new buckets on storage of its own instead of a
zone. The bucket list shows which in **Location**:

| Storage                       | Location label                                   | Copies                                 |
| ----------------------------- | ------------------------------------------------ | -------------------------------------- |
| A Deutsche Cloud storage cluster | e.g. "2 copies in 2 buildings · storage cluster" | every object in more than one building |
| Your organization's own hosts | "Own hosts · single copy"                        | one copy                               |

The API, endpoint, keys, encryption and console are the same. Such a bucket has no zone to choose
(a `zone` in the create is refused with `400`) and no replication. It is billed per GB-month held at
the price set for that storage; without a price it is counted, not billed. It is limited by the
`s3.stored-bytes` quota (see [Quotas](quotas.md)): past it, new data answers `403 QuotaExceeded`;
reading and deleting always work.

### When it fills up

- A storage cluster stops taking new data when its fullest building reaches its fill limit, with a
  warning before: 45 % (warning at 35 %) for a cluster in two buildings, 70 % (warning at 60 %) from
  three. New data then answers `507 InsufficientStorage`. Your organization is told when the
  warning level is reached.
- Your own hosts' store refuses new data from 95 % full (`507 InsufficientStorage`).

Reads and deletes keep working.

### When a part fails

- One server of a storage cluster down: its buckets keep working from the other copies.
- A whole building down, or the buildings cut off from each other: reads go on, and every write
  answers `503 ServiceUnavailable` with `Retry-After: 10` at once instead of waiting. Retry the
  write.
- No server of the cluster can read: every request answers `503 ServiceUnavailable`.
- The whole cluster unavailable: see [Keep a remote copy](keep-a-remote-copy.md).

### Versioning and lifecycle on a storage cluster

A bucket on a storage cluster created without object lock starts in shared storage. Turning on
versioning or lifecycle rules is accepted while the bucket is **empty** (it is then moved to storage
of its own, invisibly), and refused with `409` once it holds objects: turn them on right after
creating the bucket, as Terraform and most tools do. Listing versions of such a bucket before
versioning was ever on answers `501 NotImplemented`; `ListObjectsV2` lists its objects.

## Related

- [Create a bucket](create-a-bucket.md)
- [Keep a remote copy](keep-a-remote-copy.md)
- [What runs on your machines](what-runs-on-your-machines.md)
