Swift

Sachin <psachin@redhat.com>

Red Hat OpenStack Platform

Multiple HDD, where is my data?
Harddrive failure
Storage problems

INtroduction

Ownership of data
Access to data:
- HTTP, FTP, ReST
- Different devices(Mobile, Laptop)

SWIFT

- Data is loosely tied to storage
- Scalable
- Direct client access
image/svg+xml

Terminology

Swift Proxy
- Provide API access
- Coordinates requests to storage server

GET, POST, PUT, DELETE

Terminology

Swift Account
- User namespace(Ex. AUTH_test)

--------------

- Storage location for data

Text

Text

Text

AUTH_vol1

AUTH_vol2

Terminology

Swift Container
- User defined segment of an account
- Root directory

---------

Terminology

Swift object
(Actual data)

----------

Terminology

Request flow
Proxy -> Storage nodes

dEMO

- Account
- Container
- Object

data placement

Triple replication by default
Data is placed as unique as possible

data placement

Triple replication by default
Data is placed as unique as possible

data placement

Triple replication by default
Data is placed as unique as possible

data placement

Zone 1

Zone 2

Zone 3

data placement

Zone 1

Zone 3

data placement

Zone 3

data placement

Machine 1

Machine 2

data placement

Machine 1

data placement

....

data placement

corrupt data

Corrupt data

Stores checksum of data along with data
Matched checksum periodically
Object is quarantined
Replication/Rebalance

corrupt data

corrupt data

drive failure

Unmount failing drives
Replicate/rebalance data

server failure

Network/Power
New data is places elsewhere within cluster
Rebalancing

Capacity adjustment

+

Capacity adjustment

+

Capacity adjustment

+

THE Ring

swift-ring-builder <builder-file> create <PartitionPower> <Replicas> <MinPartHrs>

Storage policies

Decide where you want to store data
Based in frequency of access
Distribute data across miltiple regions
Distribute replicas across single region
Store data only on fast media - SSD

aCL

# --- Read ACL ---
# swift -r ".r:*" [container]
swift -r ".r:*" photos

# Allow/deny hosts
swift -r ".r:*.welcome.com,.r:-noisy.com"




Packstack

# Sample file. 
# Packstack answers.txt file

# --- Setting related to swift ---
CONFIG_SWIFT_INSTALL=y

# Storage backend
CONFIG_GLANCE_BACKEND=[file/swift]

# The password to use for the Swift to authenticate with Keystone
CONFIG_SWIFT_KS_PW=8efc124930f44325

# List of devices(/dev/vdb). Empth value will create loopback device
CONFIG_SWIFT_STORAGES=

# Number of zones
CONFIG_SWIFT_STORAGE_ZONES=1

# Number of swift zone replicas
CONFIG_SWIFT_STORAGE_REPLICAS=1

# File system
CONFIG_SWIFT_STORAGE_FSTYPE=[ext4/xfs]

# Size of the swift loopback file storage device
CONFIG_SWIFT_STORAGE_SIZE=2G



dEMO

Questions ?

https://gitlab.cee.redhat.com/psachin/bootcamp

psachin@redhat.com

IRC: psachin@{Red Hat, OFTC, Freenode}

Take-away notes[PDF]: https://goo.gl/XbzOTB

Red Hat OpenStack - Swift

By Sachin Patil

Red Hat OpenStack - Swift

Red Hat OpenStack Bootcamp, 2016.

  • 788
Loading comments...

More from Sachin Patil