SlideShare una empresa de Scribd logo
1 de 33
Data SLA in the cloud
About Us ScaleBase is a new startup targeting the database-as-a-service market (DBaaS) We offer unlimited database scalability and availability using our Database Load Balancer We launch in September, 2010. Stay tuned at our site.
Agenda The requirements for data SLA in public cloud environments Achieving data SLA with NOSQL Achieving data SLA with relational databases
The requirements for data SLA in public cloud environments
What We Need Availability Consistency Scalability
Brewer's (CAP) Theorem It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees: Consistency (all nodes see the same data at the same time) Availability (node failures do not prevent survivors from continuing to operate) Partition Tolerance (the system continues to operate despite arbitrary message loss) http://en.wikipedia.org/wiki/CAP_theorem
What It Means http://guyharrison.squarespace.com/blog/2010/6/13/consistency-models-in-non-relational-databases.html
Dealing With CAP Drop Partition Tolerance Run everything on one machine. This is, of course, not very scalable.
Dealing With CAP Drop Availability If a partition fail, everything waits until the data is consistent again.  This can be very complex to handle over a large number of nodes.
Dealing With CAP Drop Consistency Welcome to the “Eventually Consistent” term. At the end – everything will work out just fine - And hi,  sometimes this is a good enough solution When no updates occur for a long period of time, eventually all updates will propagate through the system and all the nodes will be consistent For a given accepted update and a given node, eventually either the update reaches the node or the node is removed from service Known as BASE (Basically Available, Soft state, Eventual consistency), as opposed to ACID
Reading More On CAP This is an excellent read, and some of my samples are from this blog http://www.julianbrowne.com/article/viewer/brewers-cap-theorem
Achieving data SLA with relational databases
Databases And CAP ACID – Consistency Availability – tons of solutions, most of them not cloud oriented Oracle RAC MySQL Proxy Etc. Replication based solutions can solve at least read availability and scalability (see Azure SQL)
Database Cloud Solutions Amazon RDS NaviSite Oracle RAC Not that popular Costs to cloud providers (complexity, not standard)
So Where Is The Problem? Partition Tolerance just doesn’t work Scaling problems (usually write but also read) BigData problems
Scaling Up Issues with scaling up when the dataset is just too big RDBMS were not designed to be distributed Began to look at multi-node database solutions Known as ‘scaling out’ or ‘horizontal scaling’ Different approaches include: Master-slave Sharding
Scaling RDBMS – Master/Slave Master-Slave All writes are written to the master. All reads performed against the replicated slave databases Critical reads may be incorrect as writes may not have been propagated down Large data sets can pose problems as master needs to duplicate data to slaves
Scaling RDBMS - Sharding Partition or sharding Scales well for both reads and writes Not transparent, application needs to be partition-aware Can no longer have relationships/joins across partitions Loss of referential integrity across shards
Other ways to scale RDBMS Multi-Master replication INSERT only, not UPDATES/DELETES No JOINs, thereby reducing query time This involves de-normalizing data In-memory databases
Achieving data SLA with NOSQL
NoSQL A term used to designate databases which differ from classic relational databases in some way. These data stores may not require fixed table schemas, and usually avoid join operations and typically scale horizontally. Academics and papers typically refer to these databases as structured storage, a term which would include classic relational databases as a subset. http://en.wikipedia.org/wiki/NoSQL
NoSQL Types Key/Value A big hash table Examples: Voldemort, Amazon Dynamo Big Table Big table, column families Examples: Hbase, Cassandra Document based Collections of collections Examples: CouchDB, MongoDB Graph databases Based on graph theory Examples: Neo4J Each solves a different problem
NO-SQL http://browsertoolkit.com/fault-tolerance.png
Pros/Cons Pros: Performance BigData Most solutions are open source Data is replicated to nodes and is therefore fault-tolerant (partitioning) Don't require a schema Can scale up and down Cons: Code change No framework support Not ACID Eco system (BI, Backup) There is always a database at the backend Some API is just too simple
Amazon S3 Code Sample AWSAuthConnection conn = new AWSAuthConnection(awsAccessKeyId, awsSecretAccessKey, secure, server, format); Response response = conn.createBucket(bucketName, location, null); final String text = "this is a test"; response = conn.put(bucketName, key, new S3Object(text.getBytes(), null), null);
Cassandra Code Sample CassandraClient cl = pool.getClient() ; KeySpaceks = cl.getKeySpace("Keyspace1") ; // insert value ColumnPathcp = new ColumnPath("Standard1" , null, "testInsertAndGetAndRemove".getBytes("utf-8"));  for(int i = 0 ; i < 100 ; i++){ ks.insert("testInsertAndGetAndRemove_"+i, cp , ("testInsertAndGetAndRemove_value_"+i).getBytes("utf-8")); } //get value for(inti = 0 ; i < 100 ; i++){ 	Column col = ks.getColumn("testInsertAndGetAndRemove_"+i, cp); 	String value = new String(col.getValue(),"utf-8") ; } //remove value for(int i = 0 ; i < 100 ; i++){ ks.remove("testInsertAndGetAndRemove_"+i, cp); }
Cassandra Code Sample – Cont’ try{ ks.remove("testInsertAndGetAndRemove_not_exist", cp); }catch(Exception e){ 	fail("remove not exist row should not throw exceptions"); } //get already removed value for(int i = 0 ; i < 100 ; i++){ try{ 	Column col = ks.getColumn("testInsertAndGetAndRemove_"+i, cp); 	fail("the value should already being deleted"); }catch(NotFoundException e){ }catch(Exception e){ 		fail("throw out other exception, should be NotFoundException." + e.toString() ); 	} } pool.releaseClient(cl) ; pool.close() ;
Cassandra Statistics Facebook Search MySQL > 50 GB Data Writes Average : ~300 ms Reads Average : ~350 ms Rewritten with Cassandra > 50 GB Data Writes Average : 0.12 ms Reads Average : 15 ms
MongoDB Mongo m = new Mongo(); DB db = m.getDB( "mydb" ); Set<String> colls = db.getCollectionNames(); for (String s : colls) { System.out.println(s); }
MongoDB – Cont’ BasicDBObjectdoc = new BasicDBObject(); doc.put("name", "MongoDB"); doc.put("type", "database"); doc.put("count", 1); BasicDBObject info = new BasicDBObject(); info.put("x", 203); info.put("y", 102); doc.put("info", info); coll.insert(doc);
Neo4J GraphDatabaseServicegraphDb = new EmbeddedGraphDatabase("var/base"); Transaction tx = graphDb.beginTx(); try { 	Node firstNode = graphDb.createNode(); 	Node secondNode = graphDb.createNode(); 	Relationship relationship = firstNode.createRelationshipTo(secondNode, MyRelationshipTypes.KNOWS); firstNode.setProperty("message", "Hello, "); secondNode.setProperty("message", "world!"); relationship.setProperty("message", "brave Neo4j "); tx.success(); System.out.print(firstNode.getProperty("message")); System.out.print(relationship.getProperty("message")); System.out.print(secondNode.getProperty("message")); } finally { tx.finish(); graphDb.shutdown(); }
The Bottom Line
Data SLA There is no golden hammer Choose your tool wisely, based on what you need Usually Start with RDBMS (shortest TTM, which is what we really care about) When scale issues occur – start moving to NoSQL based on your needs You can get Data SLA in the cloud – just think before you code!!!

Más contenido relacionado

La actualidad más candente

SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
Andrew Brust
 
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
djkucera
 
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
Gianmario Spacagna
 

La actualidad más candente (20)

PHP and Cassandra
PHP and CassandraPHP and Cassandra
PHP and Cassandra
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
SQL vs. NoSQL
SQL vs. NoSQLSQL vs. NoSQL
SQL vs. NoSQL
 
Introduction to sql database on azure
Introduction to sql database on azureIntroduction to sql database on azure
Introduction to sql database on azure
 
Stretch Database
Stretch DatabaseStretch Database
Stretch Database
 
cassandra
cassandracassandra
cassandra
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
 
It Depends
It DependsIt Depends
It Depends
 
Databases in the Cloud
Databases in the CloudDatabases in the Cloud
Databases in the Cloud
 
Scaling data on public clouds
Scaling data on public cloudsScaling data on public clouds
Scaling data on public clouds
 
Data Storage Management
Data Storage ManagementData Storage Management
Data Storage Management
 
SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...
SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...
SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...
 
Awesome SQL Tips and Tricks - Voxxed Days Cluj - 2019
 Awesome SQL Tips and Tricks - Voxxed Days Cluj - 2019 Awesome SQL Tips and Tricks - Voxxed Days Cluj - 2019
Awesome SQL Tips and Tricks - Voxxed Days Cluj - 2019
 
Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
SQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and EnhancementsSQL Server 2016 New Features and Enhancements
SQL Server 2016 New Features and Enhancements
 
It Depends - Database admin for developers - Rev 20151205
It Depends - Database admin for developers - Rev 20151205It Depends - Database admin for developers - Rev 20151205
It Depends - Database admin for developers - Rev 20151205
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
Collaborate 2009 - Migrating a Data Warehouse from Microsoft SQL Server to Or...
 
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
 
NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...
NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...
NoSQL Databases: An Introduction and Comparison between Dynamo, MongoDB and C...
 

Destacado

Aims2011 slacc-presentation final-version
Aims2011 slacc-presentation final-versionAims2011 slacc-presentation final-version
Aims2011 slacc-presentation final-version
ictseserv
 
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
Open Data Center Alliance
 
Assess enterprise applications for cloud migration
Assess enterprise applications for cloud migrationAssess enterprise applications for cloud migration
Assess enterprise applications for cloud migration
nanda1505
 
How we measure quality of JIRA deployments to Cloud?
How we measure quality of JIRA deployments to Cloud?How we measure quality of JIRA deployments to Cloud?
How we measure quality of JIRA deployments to Cloud?
Stowarzyszenie Jakości Systemów Informatycznych (SJSI)
 
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS AssuranceSLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
tcucinotta
 
Hierarchical SLA-based Service Selection for Multi-Cloud Environments
Hierarchical SLA-based Service Selection for Multi-Cloud EnvironmentsHierarchical SLA-based Service Selection for Multi-Cloud Environments
Hierarchical SLA-based Service Selection for Multi-Cloud Environments
Soodeh Farokhi
 

Destacado (20)

Aims2011 slacc-presentation final-version
Aims2011 slacc-presentation final-versionAims2011 slacc-presentation final-version
Aims2011 slacc-presentation final-version
 
Innovation with Open Source: The New South Wales Judicial Commission experience
Innovation with Open Source: The New South Wales Judicial Commission experienceInnovation with Open Source: The New South Wales Judicial Commission experience
Innovation with Open Source: The New South Wales Judicial Commission experience
 
reliability based design optimization for cloud migration
reliability based design optimization for cloud migrationreliability based design optimization for cloud migration
reliability based design optimization for cloud migration
 
The Path To Cloud - an Infograph on Cloud Migration
The Path To Cloud - an Infograph on Cloud MigrationThe Path To Cloud - an Infograph on Cloud Migration
The Path To Cloud - an Infograph on Cloud Migration
 
Metrics
MetricsMetrics
Metrics
 
5 Cloud Migration Experiences Not to Be Repeated
5 Cloud Migration Experiences Not to Be Repeated5 Cloud Migration Experiences Not to Be Repeated
5 Cloud Migration Experiences Not to Be Repeated
 
Cloud migration pattern using microservices
Cloud migration pattern using microservicesCloud migration pattern using microservices
Cloud migration pattern using microservices
 
Massimiliano Raks, Naples University on SPECS: Secure provisioning of cloud s...
Massimiliano Raks, Naples University on SPECS: Secure provisioning of cloud s...Massimiliano Raks, Naples University on SPECS: Secure provisioning of cloud s...
Massimiliano Raks, Naples University on SPECS: Secure provisioning of cloud s...
 
Tracking SLAs In Cloud
Tracking SLAs In CloudTracking SLAs In Cloud
Tracking SLAs In Cloud
 
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
Forecast 2014 Keynote: State of Cloud Migration…What's Occurring Now, and Wha...
 
Assess enterprise applications for cloud migration
Assess enterprise applications for cloud migrationAssess enterprise applications for cloud migration
Assess enterprise applications for cloud migration
 
Cloud computing final
Cloud computing finalCloud computing final
Cloud computing final
 
How we measure quality of JIRA deployments to Cloud?
How we measure quality of JIRA deployments to Cloud?How we measure quality of JIRA deployments to Cloud?
How we measure quality of JIRA deployments to Cloud?
 
Planning for a (Mostly) Hassle-Free Cloud Migration | VTUG 2016 Winter Warmer
Planning for a (Mostly) Hassle-Free Cloud Migration | VTUG 2016 Winter WarmerPlanning for a (Mostly) Hassle-Free Cloud Migration | VTUG 2016 Winter Warmer
Planning for a (Mostly) Hassle-Free Cloud Migration | VTUG 2016 Winter Warmer
 
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS AssuranceSLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
SLAs in Virtualized Cloud Computing Infrastructures with QoS Assurance
 
Outsourcing SLA versus Cloud SLA by Jurian Burgers
Outsourcing SLA versus Cloud SLA by Jurian BurgersOutsourcing SLA versus Cloud SLA by Jurian Burgers
Outsourcing SLA versus Cloud SLA by Jurian Burgers
 
Autonomic SLA-driven Provisioning for Cloud Applications
Autonomic SLA-driven Provisioning for Cloud ApplicationsAutonomic SLA-driven Provisioning for Cloud Applications
Autonomic SLA-driven Provisioning for Cloud Applications
 
Hierarchical SLA-based Service Selection for Multi-Cloud Environments
Hierarchical SLA-based Service Selection for Multi-Cloud EnvironmentsHierarchical SLA-based Service Selection for Multi-Cloud Environments
Hierarchical SLA-based Service Selection for Multi-Cloud Environments
 
Measureable Cloud Migration
Measureable Cloud MigrationMeasureable Cloud Migration
Measureable Cloud Migration
 
Cloud Migration: Tales from the Trenches
Cloud Migration: Tales from the TrenchesCloud Migration: Tales from the Trenches
Cloud Migration: Tales from the Trenches
 

Similar a Data SLA in the public cloud

Using Cassandra with your Web Application
Using Cassandra with your Web ApplicationUsing Cassandra with your Web Application
Using Cassandra with your Web Application
supertom
 

Similar a Data SLA in the public cloud (20)

No sql
No sqlNo sql
No sql
 
SQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George GrammatikosSQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George Grammatikos
 
If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.If NoSQL is your answer, you are probably asking the wrong question.
If NoSQL is your answer, you are probably asking the wrong question.
 
2014.11.14 Data Opportunities with Azure
2014.11.14 Data Opportunities with Azure2014.11.14 Data Opportunities with Azure
2014.11.14 Data Opportunities with Azure
 
SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?
 
Apache Cassandra 2.0
Apache Cassandra 2.0Apache Cassandra 2.0
Apache Cassandra 2.0
 
No sql (1)
No sql (1)No sql (1)
No sql (1)
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
Moving from SQL Server to MongoDB
Moving from SQL Server to MongoDBMoving from SQL Server to MongoDB
Moving from SQL Server to MongoDB
 
Nonrelational Databases
Nonrelational DatabasesNonrelational Databases
Nonrelational Databases
 
Using Cassandra with your Web Application
Using Cassandra with your Web ApplicationUsing Cassandra with your Web Application
Using Cassandra with your Web Application
 
Schemaless Databases
Schemaless DatabasesSchemaless Databases
Schemaless Databases
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
 
NoSQL
NoSQLNoSQL
NoSQL
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Introduction to NoSQL Database
Introduction to NoSQL DatabaseIntroduction to NoSQL Database
Introduction to NoSQL Database
 
NoSQL
NoSQLNoSQL
NoSQL
 
No sq lv2
No sq lv2No sq lv2
No sq lv2
 
SQL vs NoSQL deep dive
SQL vs NoSQL deep diveSQL vs NoSQL deep dive
SQL vs NoSQL deep dive
 
Introduction to Couchbase
Introduction to CouchbaseIntroduction to Couchbase
Introduction to Couchbase
 

Más de Liran Zelkha (8)

OC4J to WebLogic Server Migration5
OC4J to WebLogic Server Migration5OC4J to WebLogic Server Migration5
OC4J to WebLogic Server Migration5
 
שטפונות בנגב
שטפונות בנגבשטפונות בנגב
שטפונות בנגב
 
מתפ
מתפמתפ
מתפ
 
Oracle Coherence
Oracle CoherenceOracle Coherence
Oracle Coherence
 
Social Networks Optimization
Social Networks OptimizationSocial Networks Optimization
Social Networks Optimization
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Building Eclipse Plugins
Building Eclipse PluginsBuilding Eclipse Plugins
Building Eclipse Plugins
 
Aluna Introduction
Aluna IntroductionAluna Introduction
Aluna Introduction
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Data SLA in the public cloud

  • 1. Data SLA in the cloud
  • 2. About Us ScaleBase is a new startup targeting the database-as-a-service market (DBaaS) We offer unlimited database scalability and availability using our Database Load Balancer We launch in September, 2010. Stay tuned at our site.
  • 3. Agenda The requirements for data SLA in public cloud environments Achieving data SLA with NOSQL Achieving data SLA with relational databases
  • 4. The requirements for data SLA in public cloud environments
  • 5. What We Need Availability Consistency Scalability
  • 6. Brewer's (CAP) Theorem It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees: Consistency (all nodes see the same data at the same time) Availability (node failures do not prevent survivors from continuing to operate) Partition Tolerance (the system continues to operate despite arbitrary message loss) http://en.wikipedia.org/wiki/CAP_theorem
  • 7. What It Means http://guyharrison.squarespace.com/blog/2010/6/13/consistency-models-in-non-relational-databases.html
  • 8. Dealing With CAP Drop Partition Tolerance Run everything on one machine. This is, of course, not very scalable.
  • 9. Dealing With CAP Drop Availability If a partition fail, everything waits until the data is consistent again. This can be very complex to handle over a large number of nodes.
  • 10. Dealing With CAP Drop Consistency Welcome to the “Eventually Consistent” term. At the end – everything will work out just fine - And hi, sometimes this is a good enough solution When no updates occur for a long period of time, eventually all updates will propagate through the system and all the nodes will be consistent For a given accepted update and a given node, eventually either the update reaches the node or the node is removed from service Known as BASE (Basically Available, Soft state, Eventual consistency), as opposed to ACID
  • 11. Reading More On CAP This is an excellent read, and some of my samples are from this blog http://www.julianbrowne.com/article/viewer/brewers-cap-theorem
  • 12. Achieving data SLA with relational databases
  • 13. Databases And CAP ACID – Consistency Availability – tons of solutions, most of them not cloud oriented Oracle RAC MySQL Proxy Etc. Replication based solutions can solve at least read availability and scalability (see Azure SQL)
  • 14. Database Cloud Solutions Amazon RDS NaviSite Oracle RAC Not that popular Costs to cloud providers (complexity, not standard)
  • 15. So Where Is The Problem? Partition Tolerance just doesn’t work Scaling problems (usually write but also read) BigData problems
  • 16. Scaling Up Issues with scaling up when the dataset is just too big RDBMS were not designed to be distributed Began to look at multi-node database solutions Known as ‘scaling out’ or ‘horizontal scaling’ Different approaches include: Master-slave Sharding
  • 17. Scaling RDBMS – Master/Slave Master-Slave All writes are written to the master. All reads performed against the replicated slave databases Critical reads may be incorrect as writes may not have been propagated down Large data sets can pose problems as master needs to duplicate data to slaves
  • 18. Scaling RDBMS - Sharding Partition or sharding Scales well for both reads and writes Not transparent, application needs to be partition-aware Can no longer have relationships/joins across partitions Loss of referential integrity across shards
  • 19. Other ways to scale RDBMS Multi-Master replication INSERT only, not UPDATES/DELETES No JOINs, thereby reducing query time This involves de-normalizing data In-memory databases
  • 20. Achieving data SLA with NOSQL
  • 21. NoSQL A term used to designate databases which differ from classic relational databases in some way. These data stores may not require fixed table schemas, and usually avoid join operations and typically scale horizontally. Academics and papers typically refer to these databases as structured storage, a term which would include classic relational databases as a subset. http://en.wikipedia.org/wiki/NoSQL
  • 22. NoSQL Types Key/Value A big hash table Examples: Voldemort, Amazon Dynamo Big Table Big table, column families Examples: Hbase, Cassandra Document based Collections of collections Examples: CouchDB, MongoDB Graph databases Based on graph theory Examples: Neo4J Each solves a different problem
  • 24. Pros/Cons Pros: Performance BigData Most solutions are open source Data is replicated to nodes and is therefore fault-tolerant (partitioning) Don't require a schema Can scale up and down Cons: Code change No framework support Not ACID Eco system (BI, Backup) There is always a database at the backend Some API is just too simple
  • 25. Amazon S3 Code Sample AWSAuthConnection conn = new AWSAuthConnection(awsAccessKeyId, awsSecretAccessKey, secure, server, format); Response response = conn.createBucket(bucketName, location, null); final String text = "this is a test"; response = conn.put(bucketName, key, new S3Object(text.getBytes(), null), null);
  • 26. Cassandra Code Sample CassandraClient cl = pool.getClient() ; KeySpaceks = cl.getKeySpace("Keyspace1") ; // insert value ColumnPathcp = new ColumnPath("Standard1" , null, "testInsertAndGetAndRemove".getBytes("utf-8")); for(int i = 0 ; i < 100 ; i++){ ks.insert("testInsertAndGetAndRemove_"+i, cp , ("testInsertAndGetAndRemove_value_"+i).getBytes("utf-8")); } //get value for(inti = 0 ; i < 100 ; i++){ Column col = ks.getColumn("testInsertAndGetAndRemove_"+i, cp); String value = new String(col.getValue(),"utf-8") ; } //remove value for(int i = 0 ; i < 100 ; i++){ ks.remove("testInsertAndGetAndRemove_"+i, cp); }
  • 27. Cassandra Code Sample – Cont’ try{ ks.remove("testInsertAndGetAndRemove_not_exist", cp); }catch(Exception e){ fail("remove not exist row should not throw exceptions"); } //get already removed value for(int i = 0 ; i < 100 ; i++){ try{ Column col = ks.getColumn("testInsertAndGetAndRemove_"+i, cp); fail("the value should already being deleted"); }catch(NotFoundException e){ }catch(Exception e){ fail("throw out other exception, should be NotFoundException." + e.toString() ); } } pool.releaseClient(cl) ; pool.close() ;
  • 28. Cassandra Statistics Facebook Search MySQL > 50 GB Data Writes Average : ~300 ms Reads Average : ~350 ms Rewritten with Cassandra > 50 GB Data Writes Average : 0.12 ms Reads Average : 15 ms
  • 29. MongoDB Mongo m = new Mongo(); DB db = m.getDB( "mydb" ); Set<String> colls = db.getCollectionNames(); for (String s : colls) { System.out.println(s); }
  • 30. MongoDB – Cont’ BasicDBObjectdoc = new BasicDBObject(); doc.put("name", "MongoDB"); doc.put("type", "database"); doc.put("count", 1); BasicDBObject info = new BasicDBObject(); info.put("x", 203); info.put("y", 102); doc.put("info", info); coll.insert(doc);
  • 31. Neo4J GraphDatabaseServicegraphDb = new EmbeddedGraphDatabase("var/base"); Transaction tx = graphDb.beginTx(); try { Node firstNode = graphDb.createNode(); Node secondNode = graphDb.createNode(); Relationship relationship = firstNode.createRelationshipTo(secondNode, MyRelationshipTypes.KNOWS); firstNode.setProperty("message", "Hello, "); secondNode.setProperty("message", "world!"); relationship.setProperty("message", "brave Neo4j "); tx.success(); System.out.print(firstNode.getProperty("message")); System.out.print(relationship.getProperty("message")); System.out.print(secondNode.getProperty("message")); } finally { tx.finish(); graphDb.shutdown(); }
  • 33. Data SLA There is no golden hammer Choose your tool wisely, based on what you need Usually Start with RDBMS (shortest TTM, which is what we really care about) When scale issues occur – start moving to NoSQL based on your needs You can get Data SLA in the cloud – just think before you code!!!