SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
Swift
A quick introduction
March 2014
marcos.garcia@enovance.com
Index
● What is Object storage
● A quick look to Amazon S3
● Swift use cases
● History & Architecture
● Swift features
● The API
● Demo using Cyberduck
What is object storage
● HTTP accessible storage of objects (files) in
buckets (folders)
● Like FTP or WebDAV
● Added security access, metadata
● Everything is a URL
● Cheap and hassle-free
○ Notion of unlimited capacity
○ No fragmentation or integrity checks
○ No locks or concurrency problems
○ Support of partial reads or writes
What is object storage
● Designed for cloud-era requirements
○ Secure
○ Reliable
○ Scalable
○ Fast
○ Inexpensive
○ Simple
Quick look to Amazon S3
● Content storage and distribution
○ Serve static files or whole websites from S3 directly
● Better scalability for web server tier
○ Reduces ‘data gravity’, low I/O in the server, all HTTP
● Storage for data analysis
● Fine-grained access control to buckets
● Backup, archiving and disaster recovery
○ even if Amazon Glacier is a cheaper option
● ... but it’s not a Content Distribution Network
○ doesn’t optimize routing for lowest latency
○ is not optimized for content streaming
○ that’s why Amazon Cloudfront exists
Some Amazon S3 use cases
The cost of Amazon S3
● Main reason to use S3: price
● Example: 1 TB stored, modified 100GB per month
○ Storage cost: $85 / month
○ Data Transfer (Upload): $0
○ Data Transfer (Download): $12, at $0.12/GB
● A cheaper option: reduced redundancy (99’9% instead
of 99’999999999%)
○ Storage cost: $68
● Even cheaper, but just for backups (very limited
functionalities): Glacier
○ Storage cost: $10
Swift use cases
● Object Storage system
● Massively Scalable
● Runs on commodity hardware
● An S3-like solution
What is it
● Hard drive or filesystem
● NFS / SMB share
● Block storage
● any SAN/NAS/DAS
● not even a CDN
What is NOT
Swift use cases
● Multi tenancy
○ Ideal for Public or Private Clouds
○ Different URLs, groups of users, access codes, fine-grained privileges
● Backups
○ Write-Once, read-never (long term archiving).
○ Disaster recovery.
● Web Content
○ Write many, read many.
○ File-sharing websites (temporary access).
○ Static website or media-focused blogs (i.e. imgur).
● Large Objects
○ Medical/Scientific images.
○ Store your fancy images from the moon (i.e: nasa).
○ Store your VM from the cloud.
History
● Rackspace Cloud Files V1.
○ Distributed storage.
○ Centralized metadata.
○ PostgreSQL DB
● 2009: Rackspace Cloud Files V2 (Swift).
○ Full redesign and rewrite. Opensource.
○ API compatible with Amazon S3
○ Worked closely with ops.
○ Distributed storage and metadata.
○ Logical placement, based on algorithm
● Highly available, distributed, eventually consistent
object storage, using commodity servers
● Eventually consistent: a write is acknowledged before
waiting for full replication confirmation
○ Referring the CAP theorem, Swift chose:
■ availability and partition tolerance
■ dropped consistency.
● 3 rings to replicate
○ Accounts
○ Containers
○ Objects
Swift architecture
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Multiple components, usually on 2 type of nodes
○ Proxy servers: Runs the swift-proxy-server processes which proxy
requests to the appropriate Storage nodes. It also contains the
TempAuth service as WSGI middleware.
○ Storage servers: Runs the swift-account-server, swift-container-
server, and swift-object-server processes which control storage of
the account databases, the container databases, as well as the
actual stored objects.
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Proxy tier
○ Handles Incoming Requests
Scales Horizontally
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● The Ring
○ Maps data (accounts, containers, objects) to storage servers
Example of 3-replication
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Storage zones
○ Isolate Physical failures
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Quorum writes
○ Proxy acknowledges after the 2nd replica is OK, no wait for 3rd
Lookup
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Single-disk reads
Lookup
Swift architecture
Proxy Proxy Proxy Proxy
Storage Storage Storage Storage
The Ring
● Replication
○ A process that runs continuously, checks integrity as well
Swift features
● ACL
○ Free form implemented by the auth system middleware
● Healthcheck
○ Simple healthcheck page for LB
● Ratelimit
○ Rate Limiting requests
● Staticweb
○ Provide index.html in containers
● TempURL
○ Temporary URL generation for objects
● FormPost
○ Translates a browser form post into a regular Swift object PUT
● Domain Remap
○ Pretty URL with domains based containers
Swift features
● Bulk Operations
○ Multiple DELETE or upload or even tar.(b|g)z upload
● Account Quotas
○ Give operator ability to limit or set as read only accounts
● Container Quotas
○ Allows user to restrict a public container (i.e: with formpost)
● Large Objects (upload > 5GB)
○ Internally splitted when uploaded. Downloads a single assembled
object, supports files of virtually unlimited size
● CORS
○ Upload directly from the browser via javascript to Swift
● Versioning
○ Allow versioning all object in a container
● Swift3
○ S3 Compatible but this one has been pulled out of swift
The API
● Bindings for different languages: python, ruby, java…
● Multiple CLI tools: python-swiftclient, jcloud, fog
● Swift CLI:
○ delete, download, list, post, stat,upload,capabilities
○ post: Updates meta information for the account,
container,or object
● Examples of metadata (HTTP Headers)
○ X-Account-Access-Control (for ACL)
○ X-Account-Sysmeta-Global-Write-Ratelimit (for ratelimit)
○ X-Object-Manifest (for dynamic large objects)
○ X-Versions-Location (for object versioning)
○ X-Container-Sync-* (used internally for container synchronisation)
○ X-Delete-At and X-Delete-After (for object expiration)
○ X-Container-Meta-Access-Control (for CORS)
● Other
○ crossdomain.xml (for cross-domain policies)
The API
Demo using Cyberduck
Connection templates here:
https://trac.cyberduck.io/wiki/help/en/howto/openstack
Thank you
BACKUP SLIDES
(for Q&A)
Proxy Servers
● Swift public face
○ The entry point, and it has to do a lot of work too
● Determines the appropriate storage nodes
○ By using a logical map
● Coordinates responses
○ Ensures at least two replicas have succeeded
writing the object to disk before confirming to the
client
The ring
● Used by proxies and replication processes.
● Maps requests to storage nodes
● Availability zones
○ Ensure your objects are placed as far as possible
● Regions
○ Support for global clusters, multi-region replication
● Scale-out without affecting most entities
○ Only a fraction needs to be moved around
○ Still, it’s better to use the weighing system
● Up to you how to synchronise the ring
The ring
Example:
- partition power of 3
- 3 first digits are ring coordinates
MD5 hash
Account / Container Servers
● Stored using SQLITE Database
● Simple schema
○ Table for listing
○ Table for metadata
○ Stats information
● Scaling
○ With high concurrency, SQLite gets you a lot of IO
Wait, this is when you use ‘ratelimit’
Object Servers
● Use filesystem to store files
○ The file (object) is dumped on disk ‘as is’
● Use ‘xattrs’ to store metadata
○ On ext4, xfs
● Files named by timestamps
○ Last write always win
○ Deletion is treated as a version of the file with a tombstone object
● Directory structures
○ /mount/data_dir/partition/hash_suffix/hash/object.ts
Replication
● N-factor, configurable. By default is 3
● Asynchronous and peer-to-peer replicator
process
○ Traverses the local filesystem to detect changes
○ Concurrently performs operations, balancing load across physical
disks
● Push model system
○ Records and files are generally only copied from local to remote
replicas
○ It’s the duty of a node holding data to ensure its data gets to where it
belongs
○ Replica placement handled by the ring
● DB Replication
○ Hash comparison of DB files
○ Replicates whole database file using rsync, new unique id is assigned
● Object replication
○ Uses rsync for transport
○ Sync only subsets of directories
○ Hash based
○ Bound by the number of uncached directories it has to traverse
Replication
● Standard WSGI
○ Pipeline composed of a succession of middleware, ending with one
application. The last one,
● Usually provided by the proxy
○ But it can be provided by other server roles
● Auth is pluggable via middleware
○ swauth
○ keystone
Middleware
Amazon S3 in initial slides: price of $0,085 per GB per month. ROI after 5-6 months
http://www.slideshare.net/joearnold/7-steps-to-roll-out-a-private-open-stack-swift-cluster-joe-arnold-swiftstack-20120417
Swift cost estimation
Amazon S3 in initial slides: price of $0.085 per GB per month. ROI after barely 9 months
○ Monthly S3 cost for 145 TB = $10,600 ($8.5k if reduced redundancy)
○ Monthly S3 cost for 1.3 PB = $82,600 ($66k if reduced redundancy)
http://www.slideshare.net/joearnold/7-steps-to-roll-out-a-private-open-stack-swift-cluster-joe-arnold-swiftstack-20120417
Swift cost estimation
Connecting to Swift (I)
1. (Example using a ca.enocloud.com account)
2. download your openrc.sh file
3. source it (i.e. source marcos.garcia-openrc.sh)
4. put your password
5. do “keystone catalog” to validate the keystone public URL
6. recover the object-store public URL (i.e. http://198.154.188.142:
8080/v1/AUTH_17698de747ea403283730999605716c9 )
7. use swift CLI to validate (i.e. swift list)
8. in Cyberduck, setup a connection ‘Openstack Swift (Keystone
HTTP)’, with tenant:username (i.e. marcos.garcia:marcos.garcia) and
password, server ca.enocloud.com and port 5000
Connecting to Swift (II)
Connecting to Swift (III)
Connecting to Swift (IV)

Mais conteúdo relacionado

Mais procurados

Easy access to open stack object storage
Easy access to open stack object storageEasy access to open stack object storage
Easy access to open stack object storageJuan José Martínez
 
Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstackopenstackindia
 
GlusterFS Containers
GlusterFS ContainersGlusterFS Containers
GlusterFS ContainersMohamed Ashiq
 
Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Gluster.org
 
Tokyo azure meetup #9 azure update, october
Tokyo azure meetup #9   azure update, octoberTokyo azure meetup #9   azure update, october
Tokyo azure meetup #9 azure update, octoberTokyo Azure Meetup
 
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...ClusterHQ
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016aspyker
 
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementApache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementAnant Corporation
 
Logging presentation
Logging presentationLogging presentation
Logging presentationJatan Malde
 
A day in the life of a log message
A day in the life of a log messageA day in the life of a log message
A day in the life of a log messageJosef Karásek
 
QCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryQCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryAysylu Greenberg
 
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...Deepak Shetty
 
Query and audit logging in cassandra
Query and audit logging in cassandraQuery and audit logging in cassandra
Query and audit logging in cassandraVinay Kumar Chella
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Fernando Lopez Aguilar
 
Cloud Native Logging / Fluentd Summit Tokyo
Cloud Native Logging / Fluentd Summit TokyoCloud Native Logging / Fluentd Summit Tokyo
Cloud Native Logging / Fluentd Summit TokyoEduardo Silva Pereira
 
DevOps and OpenStack December 2012
DevOps and OpenStack December 2012DevOps and OpenStack December 2012
DevOps and OpenStack December 2012Matt Ray
 
Taking Your Database Global with Kubernetes
Taking Your Database Global with KubernetesTaking Your Database Global with Kubernetes
Taking Your Database Global with KubernetesChristopher Bradford
 
Cloud storage: the right way OSS EU 2018
Cloud storage: the right way OSS EU 2018Cloud storage: the right way OSS EU 2018
Cloud storage: the right way OSS EU 2018Orit Wasserman
 

Mais procurados (20)

Easy access to open stack object storage
Easy access to open stack object storageEasy access to open stack object storage
Easy access to open stack object storage
 
Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstack
 
GlusterFS Containers
GlusterFS ContainersGlusterFS Containers
GlusterFS Containers
 
Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Join the super_colony_-_feb2013
Join the super_colony_-_feb2013
 
Tokyo azure meetup #9 azure update, october
Tokyo azure meetup #9   azure update, octoberTokyo azure meetup #9   azure update, october
Tokyo azure meetup #9 azure update, october
 
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Stora...
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster ManagementApache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
Apache Cassandra Lunch #52: Airflow and Cassandra for Cluster Management
 
Logging presentation
Logging presentationLogging presentation
Logging presentation
 
A day in the life of a log message
A day in the life of a log messageA day in the life of a log message
A day in the life of a log message
 
QCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theoryQCon NYC: Distributed systems in practice, in theory
QCon NYC: Distributed systems in practice, in theory
 
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...
GlusterFS Native driver for Openstack Manila at GlusterNight Paris @ Openstac...
 
Query and audit logging in cassandra
Query and audit logging in cassandraQuery and audit logging in cassandra
Query and audit logging in cassandra
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)Data persistency (draco, cygnus, sth comet, quantum leap)
Data persistency (draco, cygnus, sth comet, quantum leap)
 
Cloud Native Logging / Fluentd Summit Tokyo
Cloud Native Logging / Fluentd Summit TokyoCloud Native Logging / Fluentd Summit Tokyo
Cloud Native Logging / Fluentd Summit Tokyo
 
DevOps and OpenStack December 2012
DevOps and OpenStack December 2012DevOps and OpenStack December 2012
DevOps and OpenStack December 2012
 
Taking Your Database Global with Kubernetes
Taking Your Database Global with KubernetesTaking Your Database Global with Kubernetes
Taking Your Database Global with Kubernetes
 
Logging for Containers
Logging for ContainersLogging for Containers
Logging for Containers
 
Fluent Bit
Fluent BitFluent Bit
Fluent Bit
 
Cloud storage: the right way OSS EU 2018
Cloud storage: the right way OSS EU 2018Cloud storage: the right way OSS EU 2018
Cloud storage: the right way OSS EU 2018
 

Destaque

20 Facts about Swift programming language
20 Facts about Swift programming language20 Facts about Swift programming language
20 Facts about Swift programming languageRohit Tirkey
 
Swift Programming Language
Swift Programming LanguageSwift Programming Language
Swift Programming LanguageAnıl Sözeri
 
Swift programming language
Swift programming languageSwift programming language
Swift programming languageNijo Job
 
Openstack Swift Introduction
Openstack Swift IntroductionOpenstack Swift Introduction
Openstack Swift IntroductionPark YounSung
 
OpenStack Swift In the Enterprise
OpenStack Swift In the EnterpriseOpenStack Swift In the Enterprise
OpenStack Swift In the EnterpriseHostway|HOSTING
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.Icalia Labs
 
A swift introduction to Swift
A swift introduction to SwiftA swift introduction to Swift
A swift introduction to SwiftGiordano Scalzo
 
Think different visualization tools for testers StarEast 2013 pascaldufour
Think different  visualization tools for testers  StarEast 2013 pascaldufourThink different  visualization tools for testers  StarEast 2013 pascaldufour
Think different visualization tools for testers StarEast 2013 pascaldufourPascal Dufour
 
CASE Award presentation
CASE Award presentationCASE Award presentation
CASE Award presentationKenon Man
 
Fun with Social, Windows 8 and Javascript
Fun with Social, Windows 8 and JavascriptFun with Social, Windows 8 and Javascript
Fun with Social, Windows 8 and JavascriptJoris Poelmans
 
Audip 2011 i dati invio
Audip 2011 i dati invioAudip 2011 i dati invio
Audip 2011 i dati invioDaniel Cerami
 
2016 citizen participation in flood risk assessment
2016 citizen participation in flood risk assessment2016 citizen participation in flood risk assessment
2016 citizen participation in flood risk assessmentAlbert Chen
 
Slow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine BushwaySlow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine BushwaySlowLiving
 
Aroma lid
Aroma lidAroma lid
Aroma lidcarsie
 
The story of j3 (4)
The story of j3 (4)The story of j3 (4)
The story of j3 (4)03077747
 

Destaque (20)

Swift 2
Swift 2Swift 2
Swift 2
 
Introduction to Swift (Дмитрий Данилов)
Introduction to Swift (Дмитрий Данилов)Introduction to Swift (Дмитрий Данилов)
Introduction to Swift (Дмитрий Данилов)
 
20 Facts about Swift programming language
20 Facts about Swift programming language20 Facts about Swift programming language
20 Facts about Swift programming language
 
Swift Introduction
Swift IntroductionSwift Introduction
Swift Introduction
 
Swift Programming Language
Swift Programming LanguageSwift Programming Language
Swift Programming Language
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
 
Openstack Swift Introduction
Openstack Swift IntroductionOpenstack Swift Introduction
Openstack Swift Introduction
 
OpenStack Swift In the Enterprise
OpenStack Swift In the EnterpriseOpenStack Swift In the Enterprise
OpenStack Swift In the Enterprise
 
Introduction to Swift programming language.
Introduction to Swift programming language.Introduction to Swift programming language.
Introduction to Swift programming language.
 
A swift introduction to Swift
A swift introduction to SwiftA swift introduction to Swift
A swift introduction to Swift
 
Clase 3
Clase 3Clase 3
Clase 3
 
Think different visualization tools for testers StarEast 2013 pascaldufour
Think different  visualization tools for testers  StarEast 2013 pascaldufourThink different  visualization tools for testers  StarEast 2013 pascaldufour
Think different visualization tools for testers StarEast 2013 pascaldufour
 
CASE Award presentation
CASE Award presentationCASE Award presentation
CASE Award presentation
 
Fun with Social, Windows 8 and Javascript
Fun with Social, Windows 8 and JavascriptFun with Social, Windows 8 and Javascript
Fun with Social, Windows 8 and Javascript
 
Audip 2011 i dati invio
Audip 2011 i dati invioAudip 2011 i dati invio
Audip 2011 i dati invio
 
2016 citizen participation in flood risk assessment
2016 citizen participation in flood risk assessment2016 citizen participation in flood risk assessment
2016 citizen participation in flood risk assessment
 
Slow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine BushwaySlow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine Bushway
 
Aroma lid
Aroma lidAroma lid
Aroma lid
 
The story of j3 (4)
The story of j3 (4)The story of j3 (4)
The story of j3 (4)
 
____
  ____  ____
____
 

Semelhante a Initial presentation of swift (for montreal user group)

Storing your data in the cloud: doing right reversim 2018
Storing your data in the cloud: doing right reversim 2018Storing your data in the cloud: doing right reversim 2018
Storing your data in the cloud: doing right reversim 2018Orit Wasserman
 
Everything you wanted to know about RadosGW - Orit Wasserman, Matt Benjamin
Everything you wanted to know about RadosGW - Orit Wasserman, Matt BenjaminEverything you wanted to know about RadosGW - Orit Wasserman, Matt Benjamin
Everything you wanted to know about RadosGW - Orit Wasserman, Matt BenjaminCeph Community
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned Omid Vahdaty
 
Ceph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldCeph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldSage Weil
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | EnglishOmid Vahdaty
 
Cloud Architecture best practices
Cloud Architecture best practicesCloud Architecture best practices
Cloud Architecture best practicesOmid Vahdaty
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Sharma Podila
 
Cncf storage-final-filip
Cncf storage-final-filipCncf storage-final-filip
Cncf storage-final-filipJuraj Hantak
 
Initial presentation of openstack (for montreal user group)
Initial presentation of openstack (for montreal user group)Initial presentation of openstack (for montreal user group)
Initial presentation of openstack (for montreal user group)Marcos García
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdfAbhi Jain
 
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022JayjeetChakraborty
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...javier ramirez
 
Real-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerReal-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerMichael Spector
 
Building a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
Building a Unified Logging Layer with Fluentd, Elasticsearch and KibanaBuilding a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
Building a Unified Logging Layer with Fluentd, Elasticsearch and KibanaMushfekur Rahman
 
Rook: Storage for Containers in Containers – data://disrupted® 2020
Rook: Storage for Containers in Containers  – data://disrupted® 2020Rook: Storage for Containers in Containers  – data://disrupted® 2020
Rook: Storage for Containers in Containers – data://disrupted® 2020data://disrupted®
 
Change data capture
Change data captureChange data capture
Change data captureRon Barabash
 

Semelhante a Initial presentation of swift (for montreal user group) (20)

Storing your data in the cloud: doing right reversim 2018
Storing your data in the cloud: doing right reversim 2018Storing your data in the cloud: doing right reversim 2018
Storing your data in the cloud: doing right reversim 2018
 
Everything you wanted to know about RadosGW - Orit Wasserman, Matt Benjamin
Everything you wanted to know about RadosGW - Orit Wasserman, Matt BenjaminEverything you wanted to know about RadosGW - Orit Wasserman, Matt Benjamin
Everything you wanted to know about RadosGW - Orit Wasserman, Matt Benjamin
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Ceph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud worldCeph data services in a multi- and hybrid cloud world
Ceph data services in a multi- and hybrid cloud world
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Cloud Architecture best practices
Cloud Architecture best practicesCloud Architecture best practices
Cloud Architecture best practices
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
 
Cncf storage-final-filip
Cncf storage-final-filipCncf storage-final-filip
Cncf storage-final-filip
 
Initial presentation of openstack (for montreal user group)
Initial presentation of openstack (for montreal user group)Initial presentation of openstack (for montreal user group)
Initial presentation of openstack (for montreal user group)
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdf
 
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022
Skyhook: Towards an Arrow-Native Storage System, CCGrid 2022
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
RubiX
RubiXRubiX
RubiX
 
Real-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerReal-time analytics with Druid at Appsflyer
Real-time analytics with Druid at Appsflyer
 
Building a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
Building a Unified Logging Layer with Fluentd, Elasticsearch and KibanaBuilding a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
Building a Unified Logging Layer with Fluentd, Elasticsearch and Kibana
 
Rook: Storage for Containers in Containers – data://disrupted® 2020
Rook: Storage for Containers in Containers  – data://disrupted® 2020Rook: Storage for Containers in Containers  – data://disrupted® 2020
Rook: Storage for Containers in Containers – data://disrupted® 2020
 
Running Cassandra in AWS
Running Cassandra in AWSRunning Cassandra in AWS
Running Cassandra in AWS
 
Change data capture
Change data captureChange data capture
Change data capture
 

Initial presentation of swift (for montreal user group)

  • 1. Swift A quick introduction March 2014 marcos.garcia@enovance.com
  • 2. Index ● What is Object storage ● A quick look to Amazon S3 ● Swift use cases ● History & Architecture ● Swift features ● The API ● Demo using Cyberduck
  • 3. What is object storage ● HTTP accessible storage of objects (files) in buckets (folders) ● Like FTP or WebDAV ● Added security access, metadata ● Everything is a URL ● Cheap and hassle-free ○ Notion of unlimited capacity ○ No fragmentation or integrity checks ○ No locks or concurrency problems ○ Support of partial reads or writes
  • 4. What is object storage ● Designed for cloud-era requirements ○ Secure ○ Reliable ○ Scalable ○ Fast ○ Inexpensive ○ Simple
  • 5. Quick look to Amazon S3
  • 6. ● Content storage and distribution ○ Serve static files or whole websites from S3 directly ● Better scalability for web server tier ○ Reduces ‘data gravity’, low I/O in the server, all HTTP ● Storage for data analysis ● Fine-grained access control to buckets ● Backup, archiving and disaster recovery ○ even if Amazon Glacier is a cheaper option ● ... but it’s not a Content Distribution Network ○ doesn’t optimize routing for lowest latency ○ is not optimized for content streaming ○ that’s why Amazon Cloudfront exists Some Amazon S3 use cases
  • 7. The cost of Amazon S3 ● Main reason to use S3: price ● Example: 1 TB stored, modified 100GB per month ○ Storage cost: $85 / month ○ Data Transfer (Upload): $0 ○ Data Transfer (Download): $12, at $0.12/GB ● A cheaper option: reduced redundancy (99’9% instead of 99’999999999%) ○ Storage cost: $68 ● Even cheaper, but just for backups (very limited functionalities): Glacier ○ Storage cost: $10
  • 8. Swift use cases ● Object Storage system ● Massively Scalable ● Runs on commodity hardware ● An S3-like solution What is it ● Hard drive or filesystem ● NFS / SMB share ● Block storage ● any SAN/NAS/DAS ● not even a CDN What is NOT
  • 9. Swift use cases ● Multi tenancy ○ Ideal for Public or Private Clouds ○ Different URLs, groups of users, access codes, fine-grained privileges ● Backups ○ Write-Once, read-never (long term archiving). ○ Disaster recovery. ● Web Content ○ Write many, read many. ○ File-sharing websites (temporary access). ○ Static website or media-focused blogs (i.e. imgur). ● Large Objects ○ Medical/Scientific images. ○ Store your fancy images from the moon (i.e: nasa). ○ Store your VM from the cloud.
  • 10. History ● Rackspace Cloud Files V1. ○ Distributed storage. ○ Centralized metadata. ○ PostgreSQL DB ● 2009: Rackspace Cloud Files V2 (Swift). ○ Full redesign and rewrite. Opensource. ○ API compatible with Amazon S3 ○ Worked closely with ops. ○ Distributed storage and metadata. ○ Logical placement, based on algorithm
  • 11. ● Highly available, distributed, eventually consistent object storage, using commodity servers ● Eventually consistent: a write is acknowledged before waiting for full replication confirmation ○ Referring the CAP theorem, Swift chose: ■ availability and partition tolerance ■ dropped consistency. ● 3 rings to replicate ○ Accounts ○ Containers ○ Objects Swift architecture
  • 12. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Multiple components, usually on 2 type of nodes ○ Proxy servers: Runs the swift-proxy-server processes which proxy requests to the appropriate Storage nodes. It also contains the TempAuth service as WSGI middleware. ○ Storage servers: Runs the swift-account-server, swift-container- server, and swift-object-server processes which control storage of the account databases, the container databases, as well as the actual stored objects.
  • 13. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Proxy tier ○ Handles Incoming Requests Scales Horizontally
  • 14. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● The Ring ○ Maps data (accounts, containers, objects) to storage servers Example of 3-replication
  • 15. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Storage zones ○ Isolate Physical failures
  • 16. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Quorum writes ○ Proxy acknowledges after the 2nd replica is OK, no wait for 3rd Lookup
  • 17. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Single-disk reads Lookup
  • 18. Swift architecture Proxy Proxy Proxy Proxy Storage Storage Storage Storage The Ring ● Replication ○ A process that runs continuously, checks integrity as well
  • 19. Swift features ● ACL ○ Free form implemented by the auth system middleware ● Healthcheck ○ Simple healthcheck page for LB ● Ratelimit ○ Rate Limiting requests ● Staticweb ○ Provide index.html in containers ● TempURL ○ Temporary URL generation for objects ● FormPost ○ Translates a browser form post into a regular Swift object PUT ● Domain Remap ○ Pretty URL with domains based containers
  • 20. Swift features ● Bulk Operations ○ Multiple DELETE or upload or even tar.(b|g)z upload ● Account Quotas ○ Give operator ability to limit or set as read only accounts ● Container Quotas ○ Allows user to restrict a public container (i.e: with formpost) ● Large Objects (upload > 5GB) ○ Internally splitted when uploaded. Downloads a single assembled object, supports files of virtually unlimited size ● CORS ○ Upload directly from the browser via javascript to Swift ● Versioning ○ Allow versioning all object in a container ● Swift3 ○ S3 Compatible but this one has been pulled out of swift
  • 21. The API ● Bindings for different languages: python, ruby, java… ● Multiple CLI tools: python-swiftclient, jcloud, fog
  • 22. ● Swift CLI: ○ delete, download, list, post, stat,upload,capabilities ○ post: Updates meta information for the account, container,or object ● Examples of metadata (HTTP Headers) ○ X-Account-Access-Control (for ACL) ○ X-Account-Sysmeta-Global-Write-Ratelimit (for ratelimit) ○ X-Object-Manifest (for dynamic large objects) ○ X-Versions-Location (for object versioning) ○ X-Container-Sync-* (used internally for container synchronisation) ○ X-Delete-At and X-Delete-After (for object expiration) ○ X-Container-Meta-Access-Control (for CORS) ● Other ○ crossdomain.xml (for cross-domain policies) The API
  • 23. Demo using Cyberduck Connection templates here: https://trac.cyberduck.io/wiki/help/en/howto/openstack
  • 25.
  • 27. Proxy Servers ● Swift public face ○ The entry point, and it has to do a lot of work too ● Determines the appropriate storage nodes ○ By using a logical map ● Coordinates responses ○ Ensures at least two replicas have succeeded writing the object to disk before confirming to the client
  • 28. The ring ● Used by proxies and replication processes. ● Maps requests to storage nodes ● Availability zones ○ Ensure your objects are placed as far as possible ● Regions ○ Support for global clusters, multi-region replication ● Scale-out without affecting most entities ○ Only a fraction needs to be moved around ○ Still, it’s better to use the weighing system ● Up to you how to synchronise the ring
  • 29. The ring Example: - partition power of 3 - 3 first digits are ring coordinates MD5 hash
  • 30. Account / Container Servers ● Stored using SQLITE Database ● Simple schema ○ Table for listing ○ Table for metadata ○ Stats information ● Scaling ○ With high concurrency, SQLite gets you a lot of IO Wait, this is when you use ‘ratelimit’
  • 31. Object Servers ● Use filesystem to store files ○ The file (object) is dumped on disk ‘as is’ ● Use ‘xattrs’ to store metadata ○ On ext4, xfs ● Files named by timestamps ○ Last write always win ○ Deletion is treated as a version of the file with a tombstone object ● Directory structures ○ /mount/data_dir/partition/hash_suffix/hash/object.ts
  • 32. Replication ● N-factor, configurable. By default is 3 ● Asynchronous and peer-to-peer replicator process ○ Traverses the local filesystem to detect changes ○ Concurrently performs operations, balancing load across physical disks ● Push model system ○ Records and files are generally only copied from local to remote replicas ○ It’s the duty of a node holding data to ensure its data gets to where it belongs ○ Replica placement handled by the ring
  • 33. ● DB Replication ○ Hash comparison of DB files ○ Replicates whole database file using rsync, new unique id is assigned ● Object replication ○ Uses rsync for transport ○ Sync only subsets of directories ○ Hash based ○ Bound by the number of uncached directories it has to traverse Replication
  • 34. ● Standard WSGI ○ Pipeline composed of a succession of middleware, ending with one application. The last one, ● Usually provided by the proxy ○ But it can be provided by other server roles ● Auth is pluggable via middleware ○ swauth ○ keystone Middleware
  • 35. Amazon S3 in initial slides: price of $0,085 per GB per month. ROI after 5-6 months http://www.slideshare.net/joearnold/7-steps-to-roll-out-a-private-open-stack-swift-cluster-joe-arnold-swiftstack-20120417 Swift cost estimation
  • 36. Amazon S3 in initial slides: price of $0.085 per GB per month. ROI after barely 9 months ○ Monthly S3 cost for 145 TB = $10,600 ($8.5k if reduced redundancy) ○ Monthly S3 cost for 1.3 PB = $82,600 ($66k if reduced redundancy) http://www.slideshare.net/joearnold/7-steps-to-roll-out-a-private-open-stack-swift-cluster-joe-arnold-swiftstack-20120417 Swift cost estimation
  • 37. Connecting to Swift (I) 1. (Example using a ca.enocloud.com account) 2. download your openrc.sh file 3. source it (i.e. source marcos.garcia-openrc.sh) 4. put your password 5. do “keystone catalog” to validate the keystone public URL 6. recover the object-store public URL (i.e. http://198.154.188.142: 8080/v1/AUTH_17698de747ea403283730999605716c9 ) 7. use swift CLI to validate (i.e. swift list) 8. in Cyberduck, setup a connection ‘Openstack Swift (Keystone HTTP)’, with tenant:username (i.e. marcos.garcia:marcos.garcia) and password, server ca.enocloud.com and port 5000