Tobby Hagler, Phase2 Technology



Similar documents
Multisite & Single Sign On by Ipsita Mishra

MongoDB Developer and Administrator Certification Course Agenda

Adding scalability to legacy PHP web applications. Overview. Mario Valdez-Ramirez

Cassandra vs MySQL. SQL vs NoSQL database comparison

ZingMe Practice For Building Scalable PHP Website. By Chau Nguyen Nhat Thanh ZingMe Technical Manager Web Technical - VNG

Database Scalability {Patterns} / Robert Treat

MySQL és Hadoop mint Big Data platform (SQL + NoSQL = MySQL Cluster?!)

The deployment of OHMS TM. in private cloud

Why NoSQL? Your database options in the new non- relational world IBM Cloudant 1

NoSQL - What we ve learned with mongodb. Paul Pedersen, Deputy CTO paul@10gen.com DAMA SF December 15, 2011

The MongoDB Tutorial Introduction for MySQL Users. Stephane Combaudon April 1st, 2014

Analytics March 2015 White paper. Why NoSQL? Your database options in the new non-relational world

Cloud Scale Distributed Data Storage. Jürmo Mehine

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

Building Scalable Web Sites: Tidbits from the sites that made it work. Gabe Rudy

In Memory Accelerator for MongoDB

Site Audit ( /site_audit) Generated on Fri, 22 Aug :14:

MongoDB. The Definitive Guide to. The NoSQL Database for Cloud and Desktop Computing. Apress8. Eelco Plugge, Peter Membrey and Tim Hawkins

Large-Scale Web Applications

KEYSTONE JS FOR DRUPAL DEVELOPERS

Hacettepe University Department Of Computer Engineering BBM 471 Database Management Systems Experiment

MongoDB and Couchbase

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

Lecture 21: NoSQL III. Monday, April 20, 2015

Taking Drupal development to the Cloud. Karel Bemelmans

Overview of Databases On MacOS. Karl Kuehn Automation Engineer RethinkDB

Scalable Web Application

Simple Tips to Improve Drupal Performance: No Coding Required. By Erik Webb, Senior Technical Consultant, Acquia

NoSQL in der Cloud Why? Andreas Hartmann

Performance and Scalability Overview

FormAPI, AJAX and Node.js

Livezilla How to Install on Shared Hosting By: Jon Manning

Scalable Architecture on Amazon AWS Cloud

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

Build it with Drupal 8

5 Mistakes to Avoid on Your Drupal Website

Installing an open source version of MateCat

Linux A first-class citizen in Windows Azure. Bruno Terkaly bterkaly@microsoft.com Principal Software Engineer Mobile/Cloud/Startup/Enterprise

Server Architecture for High- Performance Drupal

X4-2 Exadata announced (well actually around Jan 1) OEM/Grid control 12c R4 just released

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

How graph databases started the multi-model revolution

Social Networks and the Richness of Data

Installing Drupal on Your Local Computer

The CF Brooklyn Service Broker and Plugin

Ensuring scalability and performance with Drupal as your audience grows

Scaling up = getting a better machine. Scaling out = use another server and add it to your cluster.

Database Security. Principle of Least Privilege. DBMS Security. IT420: Database Management and Organization. Database Security.

NoSQL replacement for SQLite (for Beatstream) Antti-Jussi Kovalainen Seminar OHJ-1860: NoSQL databases

Not Relational Models For The Management of Large Amount of Astronomical Data. Bruno Martino (IASI/CNR), Memmo Federici (IAPS/INAF)

NOSQL INTRODUCTION WITH MONGODB AND RUBY GEOFF

Building Library Website using Drupal

Big Systems, Big Data

Big data and urban mobility

How SourceForge is Using MongoDB

Structured Data Storage

making drupal run fast

Drupal High Availability High Performance

Introduction to NoSQL and MongoDB. Kathleen Durant Lesson 20 CS 3200 Northeastern University

High Availability and Scalability for Online Applications with MySQL

MongoDB. An introduction and performance analysis. Seminar Thesis

Beyond The Web Drupal Meets The Desktop (And Mobile) Justin Miller Code Sorcery Workshop, LLC

CSCI-UA: Database Design & Web Implementation. Professor Evan Sandhaus sandhaus@cs.nyu.edu evan@nytimes.com

Asia Web Services Ltd. (vpshosting.com.hk)

Can the Elephants Handle the NoSQL Onslaught?

Transactions and ACID in MongoDB

Scaling with MongoDB. by Michael Schurter Scaling with MongoDB by Michael Schurter - OS Bridge,

Introduction to Hadoop. New York Oracle User Group Vikas Sawhney

Lecture 10: HBase! Claudia Hauff (Web Information Systems)!

A Brief Introduction to MySQL

Sharding with postgres_fdw

Performance Evaluation of NoSQL Systems Using YCSB in a resource Austere Environment

HBase A Comprehensive Introduction. James Chin, Zikai Wang Monday, March 14, 2011 CS 227 (Topics in Database Management) CIT 367

Drupal Memcached Nginx

Document Oriented Database

The NoSQL Ecosystem, Relaxed Consistency, and Snoop Dogg. Adam Marcus MIT CSAIL

Database Extension 1.5 ez Publish Extension Manual

NS DISCOVER 4.0 ADMINISTRATOR S GUIDE. July, Version 4.0

Integrating Big Data into the Computing Curricula

Querying Databases Using the DB Query and JDBC Query Nodes

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

Instant Chime for IBM Sametime For IBM Websphere and IBM DB2 Installation Guide

NoSQL: Going Beyond Structured Data and RDBMS

Intunex Oy Skillhive Service Description 1 / 6

MongoDB in the NoSQL and SQL world. Horst Rechner Berlin,

Drupal Deployment Guide: Installing, Tuning, and Using Drupal with ScaleArc + MySQL Replication

An overview of Drupal infrastructure and plans for future growth. prepared by Kieran Lal and Gerhard Killesreiter for the Drupal Association

1. Building Testing Environment

these three NoSQL databases because I wanted to see a the two different sides of the CAP

SCALABLE DATA SERVICES

Comparing SQL and NOSQL databases

Transcription:

Tobby Hagler, Phase2 Technology

Official DrupalCon London Party Batman Live World Arena Tour Buses leave main entrance Fairfield Halls at 4pm

Purpose Reasons for sharding Problems/Examples of a need for sharding Types of scaling and sharding Sharding options in Drupal

Horizontal Scale Add more machines of the same type Vertical Scale Bigger and badder machines

What is sharding? Types of sharding Partitioning and Federation How sharding helps Vs. typical monolithic Drupal database

Simply put, sharding is physically breaking large data into smaller pieces (shards) of data. The trick is putting them back together again

Sharding for scaling your application Sharding for shared application data Leveraging specialized technologies Caching is a form of federated sharding

Scale your applications by reducing data sets in any single database Secure sensitive data by isolating it elsewhere Segregates data

Memcached Boost Module Load balanced web servers MySQL Master/Slave replicate Turning Views into Custom Queries

Moar memory! Move.htacess to vhost config Apache tunes MySQL tunes Replace search with Apache Solr Optimizing PHP (custom compile) Apache Drupal module Replace Apache with nginx Switched to 3 rd party services for comments Replace contrib modules with custom development

Partitioning Horizontal Divides something into two parts Unshuffle Reduced index size Hard to do Federation Vertical A set of things Uses logical divisions Split up across physically different machines

Scaling your application s performance Distributed data load This is the Shard of Last Resort

This is not Master/Master replication Rows are divided between physical databases Will require custom database API to properly achieve split rows Applies to node loads, entity loads, etc Achieved by auto_increment by N with different starting offsets and application distributes writes in round-robin fashion and via keyed mechanisms to distribute reads and reassemble data

Vertically partitioning data by logical affiliation Sharding for shared application data Manageability distributing data sets Security - Allows for exposing certain bits of data to other applications without exposing all

Not just sharding data Shard the components of your site

Collecting resumes within your existing site Building an ideation tool

Accepting resumes for a large corporation Users submit resume via Webform Submit and process data into separate database Resume data is processed by internal HR software to evaluate potential employees

Same physical database, different schemas Uses database prefixing in settings.php ~ or ~ Different physical databases Uses db_set_active to switch db connections

Handled in settings.php Uses MySQL s dot separator to target different schemas Requires that the MySQL user used by Drupal has proper permissions Ex: db_1.users and db_2.users

$db_prefix = array ( 'default' => '', 'users' => 'shared_.', 'sessions' => 'shared_.', 'role' => 'shared_.', 'authmap' => 'shared_.', 'users_roles' => 'shared_.', 'profile_fields' => 'shared_.', 'profile_values' => 'shared_.', );

$databases = array ( 'default' => array ( 'default' => array ( 'prefix' => array( 'default' => '', 'users' => 'shared_.', 'sessions' => 'shared_.', 'role' => 'shared_.', 'authmap' => 'shared_.', 'users_roles' => 'shared_.', ), ), ), );

Can share user data between Drupal and Drupal 7 with table alters and strict prevention of Drupal 7 logins or user saves Should log in with the lower version of Drupal

Set up additional connections in settings.php Change connections using db_set_active() Use db_set_active() to switch back when done Watch for schema caching and watchdog errors

$db_url = array ( 'default' => 'mysql://user:pass@host1/db1', 'second' => 'mysql://user:pass@host2/db2', 'third' => 'mysql://user:pass@host3/db3', );

$other_database = array ( 'database' => 'databasename', 'username' => 'username', 'password' => 'password', 'host' => 'localhost', 'driver => 'mysql', ); Database::addConnectionInfo( modulekey', 'default', $other_database); db_set_active('modulekey'); // Execute queries db_set_active();

$schema = drupal_get_schema('table_name'); db_set_active('database_key'); // Execute queries Drupal_write_record('table_name', $data); db_set_active();

Hook_install_schema() drupal_write_record() Keeps web site database smaller Can keep sensitive data offsite Partitioned tables can limit/protect your web site database from internal users

Resume data is submitted via form Form s _submit function accepts final data Schema loads table definition Connects to the HR instance of MySQL Writes new record Uploads any files to private file space Switches database back HR Director can query new resumes

MongoDB is a NoSQL database Schema-less data schema defined in code Fast Document-based Simpler to scale vertically than MySQL

10gen Conference in London, UK September 19, 2011 10gen.com/conferences/mongouk-sept-2011

drupal.org/project/mongodb 7.x allows for field storage, cache, sessions, and blocks to be stored in MongoDB Allows for connections to your own collections

Four levels of objects Connection Database (schema) Collection Cursor (query results) Non-relational database Collections tend to be denormalized

Resumes.Resume: { first_name: "John", last_name: "Smith", title: "Web Developer", address: { city: "London", country: "UK" }, skills: [ 'PHP', 'Drupal', 'MySQL' ], ssn: 123456789, }

$applicant = $applicants->find ( array ( 'username' => 'Smith', ssn': 1, ), array ( 'first_name => 1, 'last_name => 1, ), );

Simple REST included as part of MongoDB Sleepy Mongoose REST interface for MongoDB (Python) MongoDB REST (Node.js)

Get a list of all idea documents http://127.0.0.1:28017/ideation/ideas/ Get all comments for a specific idea http://127.0.0.1:28017/ideation/comments/?filter id=4a8acf6e7fbadc242de5b4f3 &limit=10&offset=20 Will likely need a dedicated MongoDB REST inteface

Application sharding is data sharding Separate Drupal instances Use mod_proxy as a pass-through Can used multiple load-balanced environments

thagler@phase2technology @phase2tech 703-548-6050 d.o: tobby Slides: agileapproach.com