Top Banner
Selecting the Right Persistent Storage Options for Apps in Containers Bipin Kunal & Niels de Vos, Red Hat
20

Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

May 27, 2018

Download

Documents

dangkhue
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Selecting the Right Persistent Storage Options for Apps in ContainersBipin Kunal & Niels de Vos, Red Hat

Page 2: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Who are Bipin and Niels?

Bipin:Product lead for Gluster Support and Maintenance Engineer.

Niels:Developer and Maintainer at the Gluster community and involved in related projects.

Page 3: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Agenda• What is persistent storage• Why do we need persistent storage• Type of persistent volumes• Access modes for your PVs• Performance details between different Access Modes

Page 4: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

What is Persistent Storage?

● Persistent storage is any data storage device that retains data after power to that device is shut off.

Page 5: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Why do we need persistent storage?

• Containers are mostly stateless, but produce or gather data for later consumption.

• Containers may not always be running or available, the data should be kept so that a next run can continue where it left off.

Page 6: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

POD

RHGS POD

RHGS POD

RHGS POD

RHGS POD

INFRAPOD

INFRAPERSISTENT

VOLUME CLAIM

OpenShift: Container-Native Storage

Page 7: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

NFS

iSCSI

Azure Disk

GCE Disk

Ceph RBD

GlusterFS

AUTOMATED CONFIGURATION

SINGLE CONTROL PANEL

CHOICE OF PERSISTENT STORAGE

Amazon EBS

Storage Options for OpenShift

Page 8: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

NFS WELL UNDERSTOOD, EASY TO DEMO

PROVIDES RWX STORAGE

NO HA, NOT AVAILABLE IN THE CLOUD

REQUIRES PRE-PROVISIONING

Storage Options for OpenShift: NFS

Page 9: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

WELL UNDERSTOOD IN THE DC

BLOCK STORAGE, NO RWX SUPPORT

NOT AVAILABLE IN THE CLOUD

REQUIRES PRE-PROVISIONING

iSCSI

NFS

Storage Options for OpenShift: iSCSI

Page 10: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

AVAILABLE IN THE CLOUD ;)

NOT AVAILABLE ACROSS AZs

PERFORMANCE DEPENDS ON SIZE

BLOCK STORAGE, NO RWX SUPPORT

Amazon EBS

Azure Disk

GCE Disk

iSCSI

NFS

Storage Options for OpenShift: Cloud Provider Storage

Page 11: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

BLOCK STORAGE, NO RWX SUPPORT

SCALABLE, HA

CINDER PREFERRED FOR OCP on OSP

Ceph RBD

Amazon EBS

Azure Disk

GCE Disk

iSCSI

NFS

Storage Options for OpenShift: Ceph

Page 12: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

GlusterFS

RUNS ON TOP OF OPENSHIFT

AVAILABLE OUT OF THE BOX

SCALABLE FILE STORAGE, RWX SUPPORT

AVAILABLE EVERYWHERE

GEO-REPLICATION, SNAPSHOTSCeph RBD

Amazon EBS

Azure Disk

GCE Disk

iSCSI

NFS

Storage Options for OpenShift: Gluster

Page 13: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Access modes for your PV’s

• ReadWriteOnce (RWO)– Single node is allowed to read/write

• ReadOnlyMany (ROX)– Multiple nodes can read at the same time

• ReadWriteMany (RWX)– Multiple nodes can read and write at the same time

Page 14: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

ReadWriteOnce (RWO)

• Applications that do not need to share a filesystem among instances

• Optimizations possible, block-storage mounted in the container

• Fewer filesystem operations, only read/write data

Page 15: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

ReadOnlyMany (ROX)

• Static content that was generated• Snapshot of RWO/X promoted to ROX• Read-only mounted NFS-export

Page 16: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

ReadWriteMany (RWX)

• Dropbox like applications, Wordpress with uploading images, Jenkins Artifacts

• Performs best with limited create/write, many read

• Mounted NFS-export

Page 17: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Example: ReadWriteMany (RWX)

• Mounted NFS-export• 'git clone /srv/glusterfs.git' into the mountpoint• Repository after clone ~80 MB

50 seconds, 17133 NFSv4 operations

Page 18: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Example: ReadWriteOnce (RWO)

• Disk-image stored on NFS-export• Mounted NFS-export on the host• Mounted (loopback) disk-image on the host

< 1 second, ~1 NFSv4 operation8 seconds, 195 NFSv4 operations (+ sync)

Page 19: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD

Thank you!● Red Hat is still

not in shipping business!

● Visit the Red Hat stand register for a workshop

● Visit for cool pictures

Page 20: Bipin Kunal & Niels de Vos, Red Hat Containers Selecting ... the Right... · Selecting the Right Persistent Storage Options for Apps in ... NFS iSCSI Azure Disk GCE Disk Ceph RBD