SlideShare a Scribd company logo
架构与实践
Swift 在这里写上你的标题
       @SinaAppEngine
      副标题文字副标题文字




                杨雨 /2012-08-日
                   作者名字 /
                11 期
Content


1 Principles and Architecture
         写上你的文字你的文字
     00

2 The Practice of Swift @SinaAppEngine
    01

     02
3 Problems and Imporvemetns
     03

     04

     05
Storage Types

Types              Protocol            Application
      00    写上你的文字你的文字
Block Storage    SATA, SCSI, iSCSI     SAN, NAS, EBS
       01
File Storage       Ext3/4, XFS, NTFS   PC, Servers, NFS
       02
Object Storage     HTTP, REST          Amazon S3,
       03                              Google Cloud Storage,
                                       Rackspace Cloud Files
      04
Specific Storage   Specific protocol   MySQL, MongoDB,
      05           based on tcp        HDFS
Storage Types


        00      写上你的文字你的文字

        01

        02

        03

        04

        05




From: http://www.buildcloudstorage.com/2012/08/is-openstack-swift-reliable-enough-for.html
Targets

•High Reliability = High Durability + High Availability
•High Durability - Replicas and Recovery
•High Availability - Replicas and Partition
•Low Cost - Commodity Hardware
•Scale Out - No Single Bottleneck, Share Nothing
Reliability

 Consistent Hashing
Reliability

 Consistent Hashing with Virtual Node
Reliability

 Consistent Hashing with Virtual Node
Reliability

The advantages of consistent hashing:

1.Metadata is small;(AWS S3 has 762 billion objects)
2.Distribution unformity;
3.Peer to perr comunication;
4.Load blance.
Reliability


 •Virtual node(partition) - Object distribution uniformity
 •Weight - Allocate partitions dynamically
 •Zone - Partition Tolerance
 Zones can be used to group devices based on physical locations, power
 separations, network separations, or any other attribute that would
 lessen multiple replicas being unavailable at the same time.



 Swift :
 Ring - The index file for locating object in the cluster.
Reliability
Reliability


Durability: 99.999..9%? AWS S3 with 99.999999999%
 •Annualized failure rate of devices.(disk, network...)
 •Bit rot rate and the time to detect bit rot.
 •Mean time to recovery.
 •More about durability :
 http://www.buildcloudstorage.com/2012/08/is-openstack-swift-
 reliable-enough-for.html

Swift :
Auditor - To detect bit rot;
Replicator-To keep the consistency of object;
Consistency Model
Consistency Model

Quroum + Object Version + Async Replicatiton

Quroum Protocol:
N, the number of nodes that store replicas of the data;
W, the number of replicas that need to acknowledge the receipt of the
update before the update completes;
R, the number of replicas that are contacted when a data object is
accessed through a read operation;

If W+R>N, then the write set and the read set always overlap and one can
guarantee strong consistency.

In Swift, NWR is configurable.
General configuration: N=3, W=2, R=1 or 2, So the swift can providetwo
models of consistency, strong and eventual.
Consistency Model

Weak Consistency ( N=3,W=2,R=1 )
Consistency Model

Strong Consistency ( N=3,W=2,R=2 )
Consistency Model

Special Scene : dirty read
Architecture Prototype
Metadata

account
 |-- container1
 |------obj1
 |------obj2
 |-- container2
 |------objN



How to store the relationship of account, container and object?
•Relation Database
•NoSQL, Cassandra, MongoDB
•Relation Datatbase with Sharding
Metadata

 The target of swift: no single failure, no bottletneck, scale out


The Swift way: sqlite + consistent hashing + quroum
A sqlite db file is an object.
So the database is HA, durable and with eventual consistency.
Swift Architecture and Practice, by Alex Yang
Architecture
Swift Practice@SinaAppEngine
Swift Practice@SinaAppEngine
Our Works

•Swift as the SAE Storage
-Auth module for SAE(Key-Pair)
-Keystone for SAE(Token)
-HTTP Cache-Control module
-Quota(limit the number of containers and objects, limit the
 storage usage)
-Domain remap
   app-domain.stor.sinaapp.com/obj To
   sinas3.com/v1/SAE_app/domain
-Rsync with bwlimit
-Billing
-Storage Firewall

•Swift as the SWS Simple Storage Service
-Container unique module
  container.sinas3.com/object
-Keystone middleware for auth protocol converting
Our Steps for Switching SAE Storage


•Bypass test one month online( 旁路读写测试 )
•Switch step by step one month( 灰度切换 )
•Ops
  Monitoring: I/O, CPU, Memery, Disk
  LogCenter: syslog-ng, statistics and analytics
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex Yang
Swift Architecture and Practice, by Alex Yang
Problems&Imporvements

The async processor for keeping eventual consistency is inefficient.
Replicator, auditor, container-updater
Logic: loop all objects or dbs on disk, query replica's server to determin
whether to sync.
Results: High I/O; High CPU usage; Stress on account/container/object-
servers, impact the availability; Long time for eventual consistency, impact
the durability; The list operation is not consistent.

How to improvements?
1.Runing replicator, auditor and container updater during idle time;
2.An appropriate deployment;
3.A new protocol for keeping relplica's consistency;
  (based on log and message queue)
4.Adding new nodes, scale out.
Problems&Imporvements

The performance of sqlite.
Quota for objects and containers
Running sqlite on the high performance I/O devices

The bandwidth of rsync is not under control.
Out-of-band management
Add bandwidth limitations for rsync

Database centralized or distributed?
Problems&Imporvements

An appropriate deployment
Q&A

      Weibo: @AlexYang_Coder
      Email: yangyu4@staff.sina.com.cn
      GTalk: alex890714@gmail.com
       Blog: http://alexyang.sinaapp.com

More Related Content

What's hot (20)

PDF
SFScon16 - Michele Baldessari: "OpenStack – An introduction"
South Tyrol Free Software Conference
 
PPTX
OpenStack Introduction
openstackindia
 
PDF
Red Hat OpenStack - Open Cloud Infrastructure
Alex Baretto
 
PDF
Openstackoverview-DEC2013
Michael Lessard
 
PDF
Introduction to OpenStack : Barcamp Bangkhen 2016
Opsta
 
PDF
Openstack 101
Kamesh Pemmaraju
 
PPTX
OpenStack Juno - October 2014
OpenStack Foundation
 
PPTX
Moving AWS workloads to OpenStack
Mirantis
 
PPTX
OpenStack 101
Priti Desai
 
PDF
Webinar "Introduction to OpenStack"
CREATE-NET
 
PPTX
OpenStack basics
Thanassis Parathyras
 
PDF
Getting started with OpenStack
Knoldus Inc.
 
PPTX
OpenStack Architecture and Use Cases
Jalal Mostafa
 
PDF
OpenStack Architecture
Mirantis
 
PDF
OpenStack Overview and History
Mirantis
 
PDF
An Introduction to OpenStack
Scott Lowe
 
PDF
OpenStack 101 update
Kamesh Pemmaraju
 
PDF
Introduction to cloud and openstack
Shivaling Sannalli
 
PDF
Architecture Openstack for the Enterprise
Keith Tobin
 
PDF
Openstack architecture for the enterprise (Openstack Ireland Meet-up)
Keith Tobin
 
SFScon16 - Michele Baldessari: "OpenStack – An introduction"
South Tyrol Free Software Conference
 
OpenStack Introduction
openstackindia
 
Red Hat OpenStack - Open Cloud Infrastructure
Alex Baretto
 
Openstackoverview-DEC2013
Michael Lessard
 
Introduction to OpenStack : Barcamp Bangkhen 2016
Opsta
 
Openstack 101
Kamesh Pemmaraju
 
OpenStack Juno - October 2014
OpenStack Foundation
 
Moving AWS workloads to OpenStack
Mirantis
 
OpenStack 101
Priti Desai
 
Webinar "Introduction to OpenStack"
CREATE-NET
 
OpenStack basics
Thanassis Parathyras
 
Getting started with OpenStack
Knoldus Inc.
 
OpenStack Architecture and Use Cases
Jalal Mostafa
 
OpenStack Architecture
Mirantis
 
OpenStack Overview and History
Mirantis
 
An Introduction to OpenStack
Scott Lowe
 
OpenStack 101 update
Kamesh Pemmaraju
 
Introduction to cloud and openstack
Shivaling Sannalli
 
Architecture Openstack for the Enterprise
Keith Tobin
 
Openstack architecture for the enterprise (Openstack Ireland Meet-up)
Keith Tobin
 

Viewers also liked (20)

PDF
OpenStack keystone identity service
openstackindia
 
PPTX
OpenStack Quantum
openstackindia
 
PDF
OpenStack Quantum
openstackindia
 
PPTX
OpenStack Quantum Network Service
Lew Tucker
 
PPTX
OpenStack Icehouse Overview
OpenStack Foundation
 
PDF
State of the Stack April 2013
Randy Bias
 
PPT
How We Did It: The Case of the Credit Card Breach
Teradata
 
PDF
Swift: Immutability and You
Jens Ravens
 
PDF
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
open-e
 
PDF
Pycon 2008: Python Command-line Tools *Nix
Lecturer UC Davis & Northwestern
 
PPTX
Red Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red_Hat_Storage
 
PDF
Building RESTful APIs
Silota Inc.
 
PPTX
Software Defined presentation
John Rhodes
 
PDF
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
PPTX
Core Concept: Software Defined Everything
Thanakrit Lersmethasakul
 
PPTX
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
Stephen Foskett
 
PPTX
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
Hiranya Jayathilaka
 
PDF
Rest in flask
Yehor Nazarkin
 
PDF
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
PPTX
SDN Abstractions
martin_casado
 
OpenStack keystone identity service
openstackindia
 
OpenStack Quantum
openstackindia
 
OpenStack Quantum
openstackindia
 
OpenStack Quantum Network Service
Lew Tucker
 
OpenStack Icehouse Overview
OpenStack Foundation
 
State of the Stack April 2013
Randy Bias
 
How We Did It: The Case of the Credit Card Breach
Teradata
 
Swift: Immutability and You
Jens Ravens
 
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
open-e
 
Pycon 2008: Python Command-line Tools *Nix
Lecturer UC Davis & Northwestern
 
Red Hat Storage Day Seattle: Why Software-Defined Storage Matters
Red_Hat_Storage
 
Building RESTful APIs
Silota Inc.
 
Software Defined presentation
John Rhodes
 
Microservices with Swagger, Flask and Docker
Dhilipsiva DS
 
Core Concept: Software Defined Everything
Thanakrit Lersmethasakul
 
"FCoE vs. iSCSI - Making the Choice" from Interop Las Vegas 2011
Stephen Foskett
 
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
Hiranya Jayathilaka
 
Rest in flask
Yehor Nazarkin
 
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
SDN Abstractions
martin_casado
 
Ad

Similar to Swift Architecture and Practice, by Alex Yang (20)

PDF
Open Stack Cheng Du Swift Alex Yang
OpenCity Community
 
PPT
Openstack swift - VietOpenStack 6thmeeetup
Vietnam Open Infrastructure User Group
 
PPTX
OpenStack Swift In the Enterprise
Hostway|HOSTING
 
PPT
Exploring Openstack Swift(Object Storage) and Swiftstack
Ramit Surana
 
PDF
Configuration and deployment guide for SWIFT on Intel Architecture
Odinot Stanislas
 
PDF
Initial presentation of swift (for montreal user group)
Marcos García
 
PDF
Deploying OpenStack Object Storage (Swift)
Juan José Martínez
 
PDF
Using OpenStack Swift for Extreme Data Durability
Christian Schwede
 
PPTX
Designing and Building Multi-Region Swift Deployment
Siheon Kim
 
PDF
Swift Install Workshop - OpenStack Conference Spring 2012
Joe Arnold
 
PPTX
Open stack in sina
Hui Cheng
 
PPTX
Storage as a service OpenStack
openstackindia
 
PDF
Object Storage with Swift Cloud storage administration through OpenStack 1. A...
nkuhqytfb3547
 
PDF
Swift at Scale: The IBM SoftLayer Story
Brian Cline
 
PPTX
Data storage in clouds
Thanassis Parathyras
 
PDF
Commercialization of OpenStack Object Storage
Joe Arnold
 
DOCX
Research Paper
Netravati Patil
 
PDF
Openstack swift introduction
Deepak Mane
 
PDF
Openstack swift_osi_days
eternaltyro
 
PDF
OpenStack Swift
openstackindia
 
Open Stack Cheng Du Swift Alex Yang
OpenCity Community
 
Openstack swift - VietOpenStack 6thmeeetup
Vietnam Open Infrastructure User Group
 
OpenStack Swift In the Enterprise
Hostway|HOSTING
 
Exploring Openstack Swift(Object Storage) and Swiftstack
Ramit Surana
 
Configuration and deployment guide for SWIFT on Intel Architecture
Odinot Stanislas
 
Initial presentation of swift (for montreal user group)
Marcos García
 
Deploying OpenStack Object Storage (Swift)
Juan José Martínez
 
Using OpenStack Swift for Extreme Data Durability
Christian Schwede
 
Designing and Building Multi-Region Swift Deployment
Siheon Kim
 
Swift Install Workshop - OpenStack Conference Spring 2012
Joe Arnold
 
Open stack in sina
Hui Cheng
 
Storage as a service OpenStack
openstackindia
 
Object Storage with Swift Cloud storage administration through OpenStack 1. A...
nkuhqytfb3547
 
Swift at Scale: The IBM SoftLayer Story
Brian Cline
 
Data storage in clouds
Thanassis Parathyras
 
Commercialization of OpenStack Object Storage
Joe Arnold
 
Research Paper
Netravati Patil
 
Openstack swift introduction
Deepak Mane
 
Openstack swift_osi_days
eternaltyro
 
OpenStack Swift
openstackindia
 
Ad

More from Hui Cheng (20)

PDF
OpenStack in China
Hui Cheng
 
PPT
Island: Local Storage Volume for Cinder
Hui Cheng
 
PDF
DevOps in a Public OpenStack Cloud - Hui Cheng
Hui Cheng
 
PPTX
OpenStack Foundation Updates
Hui Cheng
 
PPTX
COSUG updates
Hui Cheng
 
PPT
Cinder intro@open stack china-tour-shenzhen
Hui Cheng
 
PPTX
Lessons from Building OpenStack Public Cloud
Hui Cheng
 
PDF
Open stack with_openflowsdn-torii
Hui Cheng
 
PPTX
Open Source Software & Open Source Hardware
Hui Cheng
 
PPTX
OpenStack Network Planning
Hui Cheng
 
PPT
Asia pacopenstack joe-draft 2012-08-08
Hui Cheng
 
PPT
The Application of OpenStack in 360buy, by Bin He
Hui Cheng
 
PPT
Distributed Block-level Storage Management for OpenStack, by Danile lee
Hui Cheng
 
PPTX
Cloud Based VDI with OpenStack, by Shifen Yang
Hui Cheng
 
PPTX
Openstorage with OpenStack, by Bradley
Hui Cheng
 
PPTX
MAKING MONEY from openstack
Hui Cheng
 
PDF
KT ucloud storage, by Jaesuk Ahn
Hui Cheng
 
PPTX
Dell OpenStack Powered Cloud Solution and Case Sharing
Hui Cheng
 
PPTX
Network Service in OpenStack Cloud, by Yaohui Jin
Hui Cheng
 
PDF
China OpenStack Community Status
Hui Cheng
 
OpenStack in China
Hui Cheng
 
Island: Local Storage Volume for Cinder
Hui Cheng
 
DevOps in a Public OpenStack Cloud - Hui Cheng
Hui Cheng
 
OpenStack Foundation Updates
Hui Cheng
 
COSUG updates
Hui Cheng
 
Cinder intro@open stack china-tour-shenzhen
Hui Cheng
 
Lessons from Building OpenStack Public Cloud
Hui Cheng
 
Open stack with_openflowsdn-torii
Hui Cheng
 
Open Source Software & Open Source Hardware
Hui Cheng
 
OpenStack Network Planning
Hui Cheng
 
Asia pacopenstack joe-draft 2012-08-08
Hui Cheng
 
The Application of OpenStack in 360buy, by Bin He
Hui Cheng
 
Distributed Block-level Storage Management for OpenStack, by Danile lee
Hui Cheng
 
Cloud Based VDI with OpenStack, by Shifen Yang
Hui Cheng
 
Openstorage with OpenStack, by Bradley
Hui Cheng
 
MAKING MONEY from openstack
Hui Cheng
 
KT ucloud storage, by Jaesuk Ahn
Hui Cheng
 
Dell OpenStack Powered Cloud Solution and Case Sharing
Hui Cheng
 
Network Service in OpenStack Cloud, by Yaohui Jin
Hui Cheng
 
China OpenStack Community Status
Hui Cheng
 

Recently uploaded (20)

PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
The Future of Artificial Intelligence (AI)
Mukul
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 

Swift Architecture and Practice, by Alex Yang

  • 1. 架构与实践 Swift 在这里写上你的标题 @SinaAppEngine 副标题文字副标题文字 杨雨 /2012-08-日 作者名字 / 11 期
  • 2. Content 1 Principles and Architecture 写上你的文字你的文字 00 2 The Practice of Swift @SinaAppEngine 01 02 3 Problems and Imporvemetns 03 04 05
  • 3. Storage Types Types Protocol Application 00 写上你的文字你的文字 Block Storage SATA, SCSI, iSCSI SAN, NAS, EBS 01 File Storage Ext3/4, XFS, NTFS PC, Servers, NFS 02 Object Storage HTTP, REST Amazon S3, 03 Google Cloud Storage, Rackspace Cloud Files 04 Specific Storage Specific protocol MySQL, MongoDB, 05 based on tcp HDFS
  • 4. Storage Types 00 写上你的文字你的文字 01 02 03 04 05 From: http://www.buildcloudstorage.com/2012/08/is-openstack-swift-reliable-enough-for.html
  • 5. Targets •High Reliability = High Durability + High Availability •High Durability - Replicas and Recovery •High Availability - Replicas and Partition •Low Cost - Commodity Hardware •Scale Out - No Single Bottleneck, Share Nothing
  • 7. Reliability Consistent Hashing with Virtual Node
  • 8. Reliability Consistent Hashing with Virtual Node
  • 9. Reliability The advantages of consistent hashing: 1.Metadata is small;(AWS S3 has 762 billion objects) 2.Distribution unformity; 3.Peer to perr comunication; 4.Load blance.
  • 10. Reliability •Virtual node(partition) - Object distribution uniformity •Weight - Allocate partitions dynamically •Zone - Partition Tolerance Zones can be used to group devices based on physical locations, power separations, network separations, or any other attribute that would lessen multiple replicas being unavailable at the same time. Swift : Ring - The index file for locating object in the cluster.
  • 12. Reliability Durability: 99.999..9%? AWS S3 with 99.999999999% •Annualized failure rate of devices.(disk, network...) •Bit rot rate and the time to detect bit rot. •Mean time to recovery. •More about durability : http://www.buildcloudstorage.com/2012/08/is-openstack-swift- reliable-enough-for.html Swift : Auditor - To detect bit rot; Replicator-To keep the consistency of object;
  • 14. Consistency Model Quroum + Object Version + Async Replicatiton Quroum Protocol: N, the number of nodes that store replicas of the data; W, the number of replicas that need to acknowledge the receipt of the update before the update completes; R, the number of replicas that are contacted when a data object is accessed through a read operation; If W+R>N, then the write set and the read set always overlap and one can guarantee strong consistency. In Swift, NWR is configurable. General configuration: N=3, W=2, R=1 or 2, So the swift can providetwo models of consistency, strong and eventual.
  • 15. Consistency Model Weak Consistency ( N=3,W=2,R=1 )
  • 19. Metadata account |-- container1 |------obj1 |------obj2 |-- container2 |------objN How to store the relationship of account, container and object? •Relation Database •NoSQL, Cassandra, MongoDB •Relation Datatbase with Sharding
  • 20. Metadata The target of swift: no single failure, no bottletneck, scale out The Swift way: sqlite + consistent hashing + quroum A sqlite db file is an object. So the database is HA, durable and with eventual consistency.
  • 25. Our Works •Swift as the SAE Storage -Auth module for SAE(Key-Pair) -Keystone for SAE(Token) -HTTP Cache-Control module -Quota(limit the number of containers and objects, limit the storage usage) -Domain remap app-domain.stor.sinaapp.com/obj To sinas3.com/v1/SAE_app/domain -Rsync with bwlimit -Billing -Storage Firewall •Swift as the SWS Simple Storage Service -Container unique module container.sinas3.com/object -Keystone middleware for auth protocol converting
  • 26. Our Steps for Switching SAE Storage •Bypass test one month online( 旁路读写测试 ) •Switch step by step one month( 灰度切换 ) •Ops Monitoring: I/O, CPU, Memery, Disk LogCenter: syslog-ng, statistics and analytics
  • 30. Problems&Imporvements The async processor for keeping eventual consistency is inefficient. Replicator, auditor, container-updater Logic: loop all objects or dbs on disk, query replica's server to determin whether to sync. Results: High I/O; High CPU usage; Stress on account/container/object- servers, impact the availability; Long time for eventual consistency, impact the durability; The list operation is not consistent. How to improvements? 1.Runing replicator, auditor and container updater during idle time; 2.An appropriate deployment; 3.A new protocol for keeping relplica's consistency; (based on log and message queue) 4.Adding new nodes, scale out.
  • 31. Problems&Imporvements The performance of sqlite. Quota for objects and containers Running sqlite on the high performance I/O devices The bandwidth of rsync is not under control. Out-of-band management Add bandwidth limitations for rsync Database centralized or distributed?
  • 33. Q&A Weibo: @AlexYang_Coder Email: [email protected] GTalk: [email protected] Blog: http://alexyang.sinaapp.com