Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

Similar documents
1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

Lecture 3: Scaling by Load Balancing 1. Comments on reviews i. 2. Topic 1: Scalability a. QUESTION: What are problems? i. These papers look at

High Throughput Computing on P2P Networks. Carlos Pérez Miguel

In Memory Accelerator for MongoDB

Large-Scale Web Applications

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

On- Prem MongoDB- as- a- Service Powered by the CumuLogic DBaaS Platform

LARGE-SCALE DATA STORAGE APPLICATIONS

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Amazon EC2 Product Details Page 1 of 5

Data Management in the Cloud

Scaling in the Cloud with AWS. By: Eli White (CTO & mojolive) eliw.com - mojolive.com

F1: A Distributed SQL Database That Scales. Presentation by: Alex Degtiar (adegtiar@cmu.edu) /21/2013

Big Systems, Big Data

extensible record stores document stores key-value stores Rick Cattel s clustering from Scalable SQL and NoSQL Data Stores SIGMOD Record, 2010

Availability Digest. MySQL Clusters Go Active/Active. December 2006

NoSQL Data Base Basics

Sharding and MongoDB. Release MongoDB, Inc.

Scalable Architecture on Amazon AWS Cloud

Practical Cassandra. Vitalii

Preparing Your IT for the Holidays. A quick start guide to take your e-commerce to the Cloud

Benchmarking Couchbase Server for Interactive Applications. By Alexey Diomin and Kirill Grigorchuk

High Availability for Database Systems in Cloud Computing Environments. Ashraf Aboulnaga University of Waterloo

Sharding and MongoDB. Release MongoDB, Inc.

References. Introduction to Database Systems CSE 444. Motivation. Basic Features. Outline: Database in the Cloud. Outline

Introduction to Database Systems CSE 444

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Scaling Analysis Services in the Cloud

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, SIGMOD, New York, June 2013

High Availability Solutions for the MariaDB and MySQL Database

BBM467 Data Intensive ApplicaAons

Scalable Application. Mikalai Alimenkou

HDMQ :Towards In-Order and Exactly-Once Delivery using Hierarchical Distributed Message Queues. Dharmit Patel Faraj Khasib Shiva Srivastava

The Sierra Clustered Database Engine, the technology at the heart of

Avoid a single point of failure by replicating the server Increase scalability by sharing the load among replicas

Cloud Computing For Bioinformatics

Scalable Internet Services and Load Balancing

Reliable Data Tier Architecture for Job Portal using AWS

Storage I/O Control: Proportional Allocation of Shared Storage Resources

Design for Failure High Availability Architectures using AWS

NoSQL. Thomas Neumann 1 / 22

SCALABILITY AND AVAILABILITY

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Rackspace Cloud Databases and Container-based Virtualization

Cloud DBMS: An Overview. Shan-Hung Wu, NetDB CS, NTHU Spring, 2015

Architecting For Failure Why Cloud Architecture is Different! Michael Stiefel

A Comparison of Clouds: Amazon Web Services, Windows Azure, Google Cloud Platform, VMWare and Others (Fall 2012)

Scalable Internet Services and Load Balancing

Understanding Neo4j Scalability

Structured Data Storage

Big Data With Hadoop

Running a Workflow on a PowerCenter Grid

Topics. 1. What is load balancing? 2. Load balancing techniques 3. Load balancing strategies 4. Sessions 5. Elastic load balancing

LOAD BALANCING TECHNIQUES FOR RELEASE 11i AND RELEASE 12 E-BUSINESS ENVIRONMENTS

Microsoft SharePoint 2010 on VMware Availability and Recovery Options. Microsoft SharePoint 2010 on VMware Availability and Recovery Options

BASICS OF SCALING: LOAD BALANCERS

Cloud Computing Is In Your Future

Multilevel Communication Aware Approach for Load Balancing

Proactive, Resource-Aware, Tunable Real-time Fault-tolerant Middleware

Virtualization and cloud computing monitoring

Survey on Comparative Analysis of Database Replication Techniques

Best Practices for Monitoring Databases on VMware. Dean Richards Senior DBA, Confio Software

Do Relational Databases Belong in the Cloud? Michael Stiefel

Non-Stop for Apache HBase: Active-active region server clusters TECHNICAL BRIEF

Conflict-Aware Scheduling for Dynamic Content Applications

Where We Are. References. Cloud Computing. Levels of Service. Cloud Computing History. Introduction to Data Management CSE 344

GraySort on Apache Spark by Databricks

Developing Scalable Java Applications with Cacheonix

Web DNS Peer-to-peer systems (file sharing, CDNs, cycle sharing)

The evolution of database technology (II) Huibert Aalbers Senior Certified Executive IT Architect

Low-cost Open Data As-a-Service in the Cloud

TECHNOLOGY WHITE PAPER Jun 2012

Facebook: Cassandra. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Overview Design Evaluation

Network Infrastructure Services CS848 Project

HADOOP PERFORMANCE TUNING

Axceleon s CloudFuzion Turbocharges 3D Rendering On Amazon s EC2

A Brief Analysis on Architecture and Reliability of Cloud Based Data Storage

Storage Systems Autumn Chapter 6: Distributed Hash Tables and their Applications André Brinkmann

Distributed Data Management

Bigdata High Availability (HA) Architecture

Non-Stop Hadoop Paul Scott-Murphy VP Field Techincal Service, APJ. Cloudera World Japan November 2014

Distributed Data Stores

Cloud Based Application Architectures using Smart Computing

How To Choose Between A Relational Database Service From Aws.Com

Cloud computing - Architecting in the cloud

DataStax Enterprise, powered by Apache Cassandra (TM)

INDIA September 2011 virtual techdays

Nutanix Tech Note. Configuration Best Practices for Nutanix Storage with VMware vsphere

Technology Insight Series

NoSQL and Hadoop Technologies On Oracle Cloud

A survey of big data architectures for handling massive data

ScaleArc for SQL Server

Benchmarking and Analysis of NoSQL Technologies

High Availability of VistA EHR in Cloud. ViSolve Inc. White Paper February

Transcription:

Architectures Cluster Computing Job Parallelism Request Parallelism 2 2010 VMware Inc. All rights reserved Replication Stateless vs. Stateful! Fault tolerance High availability despite failures If one replica fails, there is another one that can take over! Throughput Support a large user base Each replica handles a fraction of the users Scalability! Response time Support a geographically distributed user base There is a replica close to the user Fast local access! Stateless Services that require mainly computing State can be regenerated on demand Easy to replicate Example: web servers! Stateful Services uses business critical data Good performance depends on state availability Harder to replicate Example: database servers 3 4 1

Replication Example Issues! Load balancing Stateful! Provisioning! State! Fault tolerance Stateless 5 6 Load Balancing! Determines where requests will be executed! Blind techniques 7 Require minimum or no state on load balancer Strategies: Random Round robin! Load aware Consider load on replicas when routing requests Different request may generate different load Replica nodes may have different capacity Strategies: Shortest queue first Simple to implement, just track number of active requests Least loaded Replicas need to periodically provide load info to load balancer Load Balancing! Application Aware 8 Uses knowledge of the application Strategies: Shortest execution length Profile request types to generate execution time estimates Load estimates load at replica by keeping tracks of pending requests and their type, i.e., determines application-specific load metric. Routes to less loaded replica Locality-aware request distribution (LARD) Takes into account data accessed by requests, and routes similar request to the same replica to increase cache hit rates Conflict-aware distribution Execute potentially conflicting requests on same replica for early conflict detection 2

Load Balancing Comparison! Blind General Easy to implement Suboptimal! Load aware Better performance Require more state! Application aware Best performance Require even more state Harder to implement Brittle need to change if application changes AWS Elastic Load Balancer! Balances load between EC2 instances! Can distribute load across availability zones! Within an availability zone: Round-robin among the least-busy instances Tracks active connections per instance Does not monitor CPU! Supports the ability to stick user sessions to specific EC2 instances. 9 10 Self Provisioning! Automatically adjust the worker pool or number of replicas to the current workload Add workers/replicas when load increases Retire replica/workers when under load! Approaches Reactive Reconfigure when load threshold reached Proactive User prediction mechanism to trigger reconfiguration Reconfigure before saturation Based on time series or machine learning approaches Self Provisioning! Retiring replicas/workers Move instance load to rest of system All new request go to other nodes Wait for outstanding transactions to commit When idle, release! Adding replicas/workers Boot new node Transfer state/database to new replica (optional) Add replica to pool 11 12 3

Self Provisioning Considerations! Load metrics Use low level system metrics to determine node utilization CPU, I/O utilization Use application level metrics Response time, e.g., transaction completes within X milliseconds. AWS Auto Scaling! Scale automatically according to user-defined conditions! Enabled by CloudWatch! Create scale up/down policy! Associate scaling policy with CloudWatch alarm! Cost/latency prediction How long and how expensive it is to add a replica/worker Reactive: the higher the latency the lower the configuration threshold Proactive: the higher the latency the farther into the future we need to predict! Monitoring Monitoring isn t free The more data that we collect, the higher the impact on the system 13 14 Replica Control! Task of keeping data copies consistent as items are updated! There is a set of database nodes R A, R B,! Database consist of set of logical data items x, y,.! Each logical item x has physical copies x A, x B,. Where x A resides in R A! A transaction is a sequence of read and write operation on logical data items! The replica control mechanism maps the operation on the logical data items onto the physical copies Read-One-Write-All (ROWA)! Common replica control method! Read can be sent to any replicas Logical read operation r i (x) on transaction T i Mapped to r i (x A ) on one particular copy of x! Updates performed on all replicas Logical write operation w i (x) on transaction T i Mapped to w i (x A ), w i (x B ), on one particular copies of x! ROWA works well because on most applications reads >> writes 15 16 4

Primary Copy vs. Update Anywhere! Primary copy All updates are executed first on a single node, the primary Advantages: simpler to implement Disadvantages: primary can be come bottleneck! Update Anywhere/Everywhere Updates and read only request can be sent to any replica Advantages: potentially more scalable Disadvantages: harder to guarantee consistency Processing Write Operations! Writes have to the executed on all replicas! Write processing is the main overhead of replication! Symmetric update processing SQL statement is sent to all replicas All replicas parse the statement, determine the tuples affected, and perform the modification/deletion/insertion. Pros: Reuse existing mechanisms Cons: Redundancy Execution has to be deterministic. Consider and update that sets a timestamp! Asymmetric update processing SQL statement is executed locally on a single replica Writeset (extracted changes) sent to other replicas Identifier and after-image of each updated record Pros: Efficiency Cons: Harder to implement 17 18 MySQL Replication! ROWA! Primary copy! Eager and lazy replication! Symmetric and asymmetric update processing! Full and partial replication Sharding! Challenges: Very large working set Slows reads Facebook/Google user table Too many writes! Solution: Partition the data into shards Assign shards to different machines Denormalize the data 19 20 5

Sharding Strategies! Range-based partitioning E.g., username from a to m assigned to shard 1, n to z to shard 2 Pros: simple Cons: hard to get load balancing right! Directory-based partitioning Lookup service keeps track of partitioning scheme Pros: Flexibility Cons: Lookup service may become bottleneck Denormalization! Data that is access together is stored together E.g., multi valued properties in AppEngine datastore entities! Eliminates costly joins! May require replication E.g., a comment may be stored on the commenter s and commentee s profile! Hash-based partitioning Compute hash of key. Different shards responsible for different hash ranges Pros: Good load balancing 21 Cons: A little more complex, 22 Sharding! Pros High availability Faster queries More write bandwidth! Cons Queries get more complicated Need to figure out which shard to target May need to join data from multiple shards Referential integrity Foreign key constrains are hard to enforce Not supported in many databases NoSQL Examples! MongoDB! Dynamo! Google Datastore! Non-relational data model! Limited transactional support! Sharding 23 24 6

Caching! Objective: Reduce load on storage server Reduce latency to access data! Store recent/hot/frequent data in RAM! Volatile! Fast read/write access memcached! A distributed memory cache implementation! Provides a key-value store interface put (key,value) value = get(key)! Scalable and consistent temporary storage Secondary system that provides fast access to data Data stored reliably somewhere else 25 26 Usage Model! Data accesses get value from memcached if cache miss fectch data from datastore put value on memcached operate on value Failures! Machine crashes! Network errors Partitions Quorum protocols Message loss TCP handles this case Message corruption TCP handles this case! Date updates Possible to overwrite value with new data No transactional way to do this Update may succeed in datastore and fail in memcache Updates may happen at different order in datastore and memcache Instead: Invalidate item on update Fetch fresh value on next access 27 28 7

Self Healing! Normal operation Replica control protocols keep replicas consistent Provide enough information to recover from failures! Failover Failure detections In case of primary failure, choose a new primary Voting Deterministic assignment scheme, e.g., chose surviving replica with smallest ID Deal with outstanding transactions Preserve atomicity All submitted transactions should either commit or abort at all remaining replicas! Recovery Restart a failed replica, or create a new replica Integrate into the replication system Failure Tolerant Architecture! Decouple application to tolerate failure! Implemented as shared-noting independent modules! Use reliable message queues for coordination! When a task fails, it is just restarted! In addition, each part of the application can scale independently! Examples: Amazon SQS, AppEngine Task Queues 29 30 8