2. Swift Overview
John Dickinson
Swift Project Technical Lead
Wednesday, July 27, 11
3. What We’ll Cover
‣ Intro to Swift
‣ Architectural Overview
‣ Best Practices for Deploying
‣ Future work
Wednesday, July 27, 11
4. Swift is Scalable Storage
‣ Scales as the cluster grows
‣ Designed to run on commodity hardware
‣ No single point of failure
Wednesday, July 27, 11
5. Swift is not
‣ RAID
‣ Distributed Filesystem
‣ CDN
‣ SAN/NAS/DAS
Wednesday, July 27, 11
6. 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
7. Swift Use Cases (cont.)
‣ Document management
‣ Medical imaging
‣ Disaster recovery
‣ Caching
‣ Storage appliances
‣ Scientific data
Wednesday, July 27, 11
8. Example Usage
‣ Standard HTTP verbs
‣ Standard HTTP response codes
Wednesday, July 27, 11
9. 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
10. Swift History
‣ Rackspace Cloud Files (circa 2008)
‣ Distributed Storage
‣ Centralized Metadata
Wednesday, July 27, 11
11. 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
12. Modular Design of Swift
‣ Proxy Server
‣ The Ring
‣ Storage Servers
‣ Consistency Servers
Wednesday, July 27, 11
13. Proxy Server
‣ Public face of swift
‣ Determines appropriate storage nodes
‣ https://swift.example.com/v1/account/container/object
‣ Coordinates responses
Wednesday, July 27, 11
14. The Ring
‣ Maps requests to storage nodes
‣ Availability zones
‣ Expandable without affecting most entities
Wednesday, July 27, 11
15. 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
16. Storage Servers
‣ Account server
‣ Container server
‣ Object server
Wednesday, July 27, 11
17. 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
18. 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
20. How to Deploy
‣ Swift All-In-One (SAIO)
‣ Small cluster
‣ Large cluster
Wednesday, July 27, 11
21. 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
22. How to Deploy (Small Cluster)
‣ Two load-balanced proxies
‣ Five storage nodes
‣ This area needs work
Wednesday, July 27, 11
23. How to Deploy (Large Cluster)
‣ Five zones
‣ Two proxies per zone
‣ Many storage nodes per zone
Wednesday, July 27, 11
24. 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
25. 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
26. 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
27. What Swift is “Missing”
‣ Auth
‣ ID management
‣ Stats
‣ Quotas
‣ Billing
‣ CDN
Wednesday, July 27, 11
28. Questions?
‣ #openstack on freenode
‣ http://launchpad.net/swift
‣ http://d.not.mn/swift_overview_oscon2011.pdf
Wednesday, July 27, 11
29. John Dickinson
‣ @notmyname
‣ http://gplus.to/notmyname
‣ me@not.mn
‣ http://not.mn
Wednesday, July 27, 11