Skip to content

Instantly share code, notes, and snippets.

@nitisht
Last active December 4, 2017 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitisht/ba07d65626f4848b338513fff1d075c5 to your computer and use it in GitHub Desktop.
Save nitisht/ba07d65626f4848b338513fff1d075c5 to your computer and use it in GitHub Desktop.
x-amz-storage-class implementation proposal

Minio Storage Class

Storage Classes provide administrators an option to set number of parity disks used for erasure encoded objects.

Current behaviour

By default Minio server uses half of the available disks to store data and rest for parity. This means if you have N disks, Minio server will erasure-encode data across as N/2 data disks and N/2 parity disks.

The write quorum is (N/2) + 1 and read quorum is N/2.

With Storage class support

Before starting Minio server, administrator can set these environment variables.

Environment Variable Storage Class Default Value Read Quorum Write Quorum
MINIO_STORAGE_CLASS_RRS Reduced Redundancy EC:2 2 2
MINIO_STORAGE_CLASS_STANDARD Standard EC:N/2 N/2 N/2 + 1

The default value for these variable are in the format Backend encoding:Number of parity disks. For example in EC:2, EC stands for erasure coding and 2 indicates the number of parity disks to be used. Minimum of 2 parity is required.

When x-amz-storage-class is set to MINIO_STORAGE_CLASS_RRS in request header of a putObject call, Minio server will store that object on (N-2) data disks and 2 parity disks. (N is the total number of disks).

When x-amz-storage-class is set to MINIO_STORAGE_CLASS_STANDARD in request header of a putObject call, Minio server will store that object on N/2 data disks and N/2 parity disks. (N is the total number of disks).

x-amz-storage-class values in the header will not be validated. The server will accept all values and if it is a known value, server will behave accordingly.

Pending decisions

  • Update ~/.minio/config.json or not. Proposed format change
"storageClass":{
        "standard":{
            "type": "erasure"
            "parity": 4
        }
        "rrs":{
            "type": "erasure"
            "parity": 2
        }
    }
  • Other supported options for environment variable MINIO_STORAGE_CLASS_RRS and MINIO_STORAGE_CLASS_STANDARD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment