29
Wednesday, July 27, 11

OpenStack Swift overview oscon2011

Embed Size (px)

Citation preview

Page 1: OpenStack Swift overview oscon2011

Wednesday, July 27, 11

Page 2: OpenStack Swift overview oscon2011

Swift Project Technical LeadJohn Dickinson

Swift Overview

Wednesday, July 27, 11

Page 3: OpenStack Swift overview oscon2011

What We’ll Cover

‣ Intro to Swift‣ Architectural Overview‣ Best Practices for Deploying‣ Future work

Wednesday, July 27, 11

Page 4: OpenStack Swift overview oscon2011

Swift is Scalable Storage

‣ Scales as the cluster grows‣ Designed to run on commodity hardware‣ No single point of failure

Wednesday, July 27, 11

Page 5: OpenStack Swift overview oscon2011

Swift is not

‣ RAID‣ Distributed Filesystem‣ CDN‣ SAN/NAS/DAS

Wednesday, July 27, 11

Page 6: OpenStack Swift overview oscon2011

Swift Use Cases

‣ Multi-tenant ‣ Backups‣ Typically large

‣ Write-once, read-never

‣ Web Content‣ Typically small

‣ Write-many, read-very-many

Wednesday, July 27, 11

Page 7: OpenStack Swift overview oscon2011

Swift Use Cases (cont.)

‣ Document management‣ Medical imaging‣ Disaster recovery‣ Caching‣ Storage appliances‣ Scientific data

Wednesday, July 27, 11

Page 8: OpenStack Swift overview oscon2011

Example Usage

‣ Standard HTTP verbs‣ Standard HTTP response codes

Wednesday, July 27, 11

Page 9: OpenStack Swift overview oscon2011

Designing Swift

‣ At scale, everything breaks‣ Design for failure

‣ The “Happy Path” is trivial

‣ At scale, even rare events happen a lot‣ “Simple is better than complex.”

Wednesday, July 27, 11

Page 10: OpenStack Swift overview oscon2011

Swift History

‣ Rackspace Cloud Files (circa 2008)‣ Distributed Storage

‣ Centralized Metadata

Wednesday, July 27, 11

Page 11: OpenStack Swift overview oscon2011

Swift History (cont.)

‣ Rackspace Cloud Files (circa 2010)‣ Redesigned from the ground up

‣ Distributed storage and metadata

‣ Worked closely with ops

Wednesday, July 27, 11

Page 12: OpenStack Swift overview oscon2011

Modular Design of Swift

‣ Proxy Server‣ The Ring‣ Storage Servers‣ Consistency Servers

Wednesday, July 27, 11

Page 13: OpenStack Swift overview oscon2011

Proxy Server

‣ Public face of swift‣ Determines appropriate storage nodes‣ https://swift.example.com/v1/account/container/object

‣ Coordinates responses

Wednesday, July 27, 11

Page 14: OpenStack Swift overview oscon2011

The Ring

‣ Maps requests to storage nodes‣ Availability zones‣ Expandable without affecting most entities

Wednesday, July 27, 11

Page 15: OpenStack Swift overview oscon2011

The Ring, in detail

‣ Started as a consistent-hashing ring‣ Availability zones‣ Became a static map of partitions to volumes‣ What is a partition?

‣ What is a volume?

Wednesday, July 27, 11

Page 16: OpenStack Swift overview oscon2011

Storage Servers

‣ Account server‣ Container server‣ Object server

Wednesday, July 27, 11

Page 17: OpenStack Swift overview oscon2011

Storage Servers (Account and Container)

‣ SQLite databases‣ Groups containers and objects into accounts‣ Simple schema‣ Table for listings

‣ Table for metadata

‣ Scale concerns?

Wednesday, July 27, 11

Page 18: OpenStack Swift overview oscon2011

Storage Servers (Object)

‣ Use the file system to store files‣ Any file system that supports xattrs

‣ Files named by timestamp‣ Tombstones

‣ Directory structure‣ /mount/data_dir/partition/hash_suffix/hash/object.ts

‣ Directory metadata can easily exhaust RAM

Wednesday, July 27, 11

Page 19: OpenStack Swift overview oscon2011

Consistency Servers

‣ Replicators‣ Updaters‣ Auditors

Wednesday, July 27, 11

Page 20: OpenStack Swift overview oscon2011

How to Deploy

‣ Swift All-In-One (SAIO)‣ Small cluster‣ Large cluster

Wednesday, July 27, 11

Page 21: OpenStack Swift overview oscon2011

How to Deploy (SAIO)

‣ All services in one VM‣ Use loopback devices for storage‣ Great for dev work and validation testing

Wednesday, July 27, 11

Page 22: OpenStack Swift overview oscon2011

How to Deploy (Small Cluster)

‣ Two load-balanced proxies‣ Five storage nodes‣ This area needs work

Wednesday, July 27, 11

Page 23: OpenStack Swift overview oscon2011

How to Deploy (Large Cluster)

‣ Five zones‣ Two proxies per zone‣ Many storage nodes per zone

Wednesday, July 27, 11

Page 24: OpenStack Swift overview oscon2011

How to Deploy (Large Cluster, networking)

‣ 10g external network‣ 1g (or 10g) internal network‣ Use-case concerns‣ Internal proxy network divided by replica count

Wednesday, July 27, 11

Page 25: OpenStack Swift overview oscon2011

How to Deploy (Large Cluster, IO)

‣ Dedicated Container and Account servers‣ Few, relative to object servers

‣ Many IOPS (i.e. SSDs)

‣ Cheap storage for Object servers

Wednesday, July 27, 11

Page 26: OpenStack Swift overview oscon2011

Future Dev Work

‣ Better Ring‣ Layered zones

‣ Unique-of-zones-as-possible

‣ Tiered storage

‣ More modular deployment‣ Cabinets, not zones

‣ More features

Wednesday, July 27, 11

Page 27: OpenStack Swift overview oscon2011

What Swift is “Missing”

‣ Auth‣ ID management

‣ Stats‣ Quotas

‣ Billing

‣ CDN

Wednesday, July 27, 11

Page 28: OpenStack Swift overview oscon2011

Questions?

‣ #openstack on freenode‣ http://launchpad.net/swift‣ http://d.not.mn/swift_overview_oscon2011.pdf

Wednesday, July 27, 11

Page 29: OpenStack Swift overview oscon2011

John Dickinson

‣ @notmyname‣ http://gplus.to/notmyname‣ [email protected]‣ http://not.mn

Wednesday, July 27, 11