SlideShare a Scribd company logo
1 of 28
Download to read offline
Sharding with Spider solutions
Spiral-Arms
Kentoku SHIBA
What is the Spider Storage Engine?
Spider is a Storage Engine.
Spider Storage Engine is a plugin of
MariaDB/MySQL. Spider tables can be
used on remote MariaDB/MySQL/OracleDB
tables as local tables. And Spider can
create database sharding by using table
partitioning feature.
What is Spider Storage Engine
Spider is bundled in MariaDB
from 10.0.4.
Using Spider
dividing huge data into multiple servers
1. High traffic processing(DB sharding)
2. Parallel processing
You can use
3. multiple backend databases for different application
as one database through Spider.
SPIDER
(MySQL/MariaDB)
SPIDER
(MySQL/MariaDB)
Spider structure sample of database sharding
DB1
tbl_a1
1.Request
2.Just connect to spider
3.Response
DB2 DB3
AP
SPIDER
(MySQL/MariaDB)
An application can use all databases
by only connecting to one database.
APAP AP AP
tbl_a2 tbl_a3
How to use Spider (1/5)
1. Install Spider bundled with
MariaDB/MySQL.
2. Login MariaDB/MySQL then
install Spider as a plugin.
(execute install_spider.sql)
3. Create Spider table.
How to use Spider (2/5)
Create one to one Spider table.
CREATE TABLE t1(
c1 int,
c2 varchar(100),
PRIMARY KEY(c1)
)ENGINE=spider DEFAULT CHARSET=utf8
COMMENT '
table "rt1", database "test", port "3306",
host "host name of data node",
user "user name for data node",
password "password for data node"
';
Set engine name to “Spider” and write connect
information (and parameter) in the comment.
How to use Spider (3/5)
You can create Spider tables without column definitions in
MariaDB. In this case Spider gets the column definition from
data node.
CREATE TABLE t1
ENGINE=spider DEFAULT CHARSET=utf8
COMMENT '
table "rt1", database "test", port "3306",
host "host name of data node",
user "user name for data node",
password "password for data node"
';
How to use Spider (4/5)
Create one to many (sharding) Spider table
CREATE TABLE t1(
c1 int,
c2 varchar(100),
PRIMARY KEY(c1)
)ENGINE=spider DEFAULT CHARSET=utf8
COMMENT 'table "rt1", database "test", port "3306",
user "user name for data node", password "password for data node"'
PARTITION BY RANGE(c1) (
PARTITION p0 VALUES LESS THAN (100000) COMMENT 'host "h1"',
PARTITION p1 VALUES LESS THAN (200000) COMMENT 'host "h2"',
PARTITION p2 VALUES LESS THAN (300000) COMMENT 'host "h3"',
PARTITION p3 VALUES LESS THAN MAXVALUE COMMENT 'host "h4"'
);
Write shared connect information to table comment,
shard specific connect information to partition comment.
How to use Spider (5/5)
You can use “CREATE SERVER” statement for defining
connection information.
CREATE SERVER srv1
FOREIGN DATA WRAPPER mysql
HOST 'host name of data node',
DATABASE 'test',
USER 'user name for data node',
PASSWORD 'password for data node',
PORT 3306
;
You can use create server definition by writing “server” parameter
into table/partition comment.
CREATE TABLE t1(
c1 int,
c2 varchar(100),
PRIMARY KEY(c1)
)ENGINE=spider DEFAULT CHARSET=utf8
COMMENT 'table "rt1", server "srv1"';
Spider’s other features
Spider’s other features
Redundancy
You can choose redundant level per table/partition.
Fault Tolerance
You can use not only Spider’s fault tolerant feature
but also other MySQL fault tolerance solutions.
Fulltext/Geo search feature
(with table partitioning, available for patched MariaDB)
You can use backend Fulltext/Geo search feature
transparently.
Spider’s other features
NoSQL feature (not available for MariaDB yet)
You can use HandlerSocket for Spider.
OracleDB connecting
You can use OracleDB for data node.
Note: You need to build from source code
for using this feature
Parallel searching
(available for patched MariaDB)
You can search sharded table by parallel.
Spider’s other features
Direct updating
(available for patched MariaDB)
Improve updating performance.
Direct aggregating
(available for patched MariaDB)
Improve aggregating(group by) performance.
Engine condition pushdown
(with table partitioning, available for patched MariaDB)
Improve searching with full-scan performance.
Spider’s other features
Multi Range Read
(include Batched Key Access)
(with table partitioning, available for patched MariaDB)
Improve searching with join performance.
Introducing other plugin
which is combined with Spider in many cases
1. Vertical Partitioning Storage Engine
2. HandlerSocket Plugin
3. Mroonga Storage Engine
Other plugins
Vertical Partitioning Storage Engine
Vertical Partitioning (VP) Storage Engine’s
main features
1. Column level partitioning.
2. Works like a view of one to one relation tables.
Possible to direct access to child tables.
But, VP table can use as a table including
insert statement.
3. For using different sharding (horizontal
partitioning) rules case by case.
4. Support online copying data between child tables.
Structure sample of using different sharding rules (1/2)
DB2
tbl_a
1.Request 3.Response
DB3
tbl_a
DB4
tbl_a
APAPAP AP AP
DB1
tbl_a (vp)
DB5
tbl_a
Partition
by col_a
tbl_a1(spider)
Partition
by col_b
tbl_a2(spider)
select … from tbl_a where col_a = 1
Structure sample of using different sharding rules (2/2)
DB2
tbl_a
1.Request 3.Response
DB3
tbl_a
DB4
tbl_a
APAPAP AP AP
DB1
tbl_a (vp)
DB5
tbl_a
Partition
by col_a
tbl_a1(spider)
Partition
by col_b
tbl_a2(spider)
select … from tbl_a where col_b = 1
1. Vertical Partitioning Storage Engine
2. HandlerSocket Plugin
3. Mroonga Storage Engine
Other plugins
HandlerSocket Plugin
Handlersocket (HS) Plugin’s main features
1. Offering high-speed NoSQL access to MySQL.
2. Offering NoSQL access to sharded servers by
combining with Spider.
Handlersocket is developed by Akira Higuchi.
https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL
Patched version for Spider is bundled with
Spider bundled MySQL.
http://spiderformysql.com/download_spider.html
1. Vertical Partitioning Storage Engine
2. HandlerSocket Plugin
3. Mroonga Storage Engine
Other plugins
Mroonga Storage Engine (1/2)
Mroonga Storage Engine’s main features
1. Offering high-speed FULLTEXT search.
2. Offering high-speed GEO search.
3. High-speed updating with multiple thread
searching. (lock-free model)
4. Support CJK languages.
Mroonga Storage Engine (2/2)
Mroonga Storage Engine’s main features
5. You can use to add FULLTEXT/GEO search for
other storage engines.
6. Offering FULLTEXT/GEO search to sharded
servers by combining with Spider.
Mroonga’s documentation is available.
http://mroonga.github.com/
The feature roadmap
of Spider
The feature roadmap of Spider
Spring 2016
- Recovering statistics information at startup tables.
(Improving startup phase of MariaDB) DONE
binary
http://spiderformysql.com/downloads/spider-3.3/mariadb-10.1.12-
spider-3.3.8-vp-1.1-linux-x86_64-glibc25b.tgz
source code
http://spiderformysql.com/downloads/spider-3.3/mariadb-10.1.12-
spider-3.3.8-vp-1.1b.tgz
- Reducing number of threads for collecting statistics
information from data nodes. (Reduce memory usage)
The feature roadmap of Spider
Summer 2016
- Direct join on data node part1. (for simple joined SQL) (not
include partitioned table and redundant table)
- Auto repair broken spider system table.
- Direct join on data node part2. (for simple joined SQL)
(include partitioned table and not include redundant table)
Autumn 2016
- Auto XA recovery and commit/rollback on startup phase of
MariaDB.
- Direct join on data node part3. (for simple joined SQL)
(include partitioned table and redundant table)

More Related Content

What's hot

Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
Giedrius Rimkus
 

What's hot (20)

企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
企業・業界情報プラットフォームSPEEDAにおけるElasticsearchの活用
 
Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016Codership's galera cluster installation and quickstart webinar march 2016
Codership's galera cluster installation and quickstart webinar march 2016
 
Bare metal Hadoop provisioning
Bare metal Hadoop provisioningBare metal Hadoop provisioning
Bare metal Hadoop provisioning
 
konfigurasi freeradius + daloradius in debian 9
konfigurasi freeradius + daloradius in debian 9konfigurasi freeradius + daloradius in debian 9
konfigurasi freeradius + daloradius in debian 9
 
GuiceCon 2011 - Sisu
GuiceCon 2011 - SisuGuiceCon 2011 - Sisu
GuiceCon 2011 - Sisu
 
Apache Cotton
Apache CottonApache Cotton
Apache Cotton
 
Painless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloudPainless ruby deployment on shelly cloud
Painless ruby deployment on shelly cloud
 
Amazon Web Services EC2 Basics
Amazon Web Services EC2 BasicsAmazon Web Services EC2 Basics
Amazon Web Services EC2 Basics
 
Hadoop 2.x HDFS Cluster Installation (VirtualBox)
Hadoop 2.x  HDFS Cluster Installation (VirtualBox)Hadoop 2.x  HDFS Cluster Installation (VirtualBox)
Hadoop 2.x HDFS Cluster Installation (VirtualBox)
 
AWS 기반 Docker, Kubernetes
AWS 기반 Docker, KubernetesAWS 기반 Docker, Kubernetes
AWS 기반 Docker, Kubernetes
 
Distributed Data Processing Workshop - SBU
Distributed Data Processing Workshop - SBUDistributed Data Processing Workshop - SBU
Distributed Data Processing Workshop - SBU
 
Elasticsearch 1.x Cluster Installation (VirtualBox)
Elasticsearch 1.x Cluster Installation (VirtualBox)Elasticsearch 1.x Cluster Installation (VirtualBox)
Elasticsearch 1.x Cluster Installation (VirtualBox)
 
20160627 Docker on Azure Hands on
20160627 Docker on Azure Hands on20160627 Docker on Azure Hands on
20160627 Docker on Azure Hands on
 
MariaDB ColumnStore column-oriented database Install memo
MariaDB ColumnStore column-oriented database Install memoMariaDB ColumnStore column-oriented database Install memo
MariaDB ColumnStore column-oriented database Install memo
 
Cassandra Operations at Netflix
Cassandra Operations at NetflixCassandra Operations at Netflix
Cassandra Operations at Netflix
 
Installing hive on ubuntu 16
Installing hive on ubuntu 16Installing hive on ubuntu 16
Installing hive on ubuntu 16
 
StackStorm on AWS EKS demo
StackStorm on AWS EKS demoStackStorm on AWS EKS demo
StackStorm on AWS EKS demo
 
Creating Elasticsearch Snapshots
Creating Elasticsearch SnapshotsCreating Elasticsearch Snapshots
Creating Elasticsearch Snapshots
 
Dockerの準備
Dockerの準備Dockerの準備
Dockerの準備
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 

Viewers also liked

Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
Alexey Kharlamov
 

Viewers also liked (11)

Spider storage engine (dec212016)
Spider storage engine (dec212016)Spider storage engine (dec212016)
Spider storage engine (dec212016)
 
Spiderストレージエンジンのご紹介
Spiderストレージエンジンのご紹介Spiderストレージエンジンのご紹介
Spiderストレージエンジンのご紹介
 
Clash of clans data structures
Clash of clans   data structuresClash of clans   data structures
Clash of clans data structures
 
From a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandFrom a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised Land
 
MariaDB ColumnStore 20160721
MariaDB ColumnStore 20160721MariaDB ColumnStore 20160721
MariaDB ColumnStore 20160721
 
Hadoop ecosystem
Hadoop ecosystemHadoop ecosystem
Hadoop ecosystem
 
Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
Building large-scale analytics platform with Storm, Kafka and Cassandra - NYC...
 
Dev ops for big data cluster management tools
Dev ops for big data  cluster management toolsDev ops for big data  cluster management tools
Dev ops for big data cluster management tools
 
歡迎回來:全面圖譜,金融 3.0 顧客行銷新視界
歡迎回來:全面圖譜,金融 3.0 顧客行銷新視界歡迎回來:全面圖譜,金融 3.0 顧客行銷新視界
歡迎回來:全面圖譜,金融 3.0 顧客行銷新視界
 
終歸:分群消費者x多元商機的實現
終歸:分群消費者x多元商機的實現終歸:分群消費者x多元商機的實現
終歸:分群消費者x多元商機的實現
 
Real Time Data Streaming using Kafka & Storm
Real Time Data Streaming using Kafka & StormReal Time Data Streaming using Kafka & Storm
Real Time Data Streaming using Kafka & Storm
 

Similar to Sharding with spider solutions 20160721

My sql storage engines
My sql storage enginesMy sql storage engines
My sql storage engines
Vasudeva Rao
 
My sql fabric webinar tw2
My sql fabric webinar tw2My sql fabric webinar tw2
My sql fabric webinar tw2
Ivan Tu
 

Similar to Sharding with spider solutions 20160721 (20)

Newest topic of spider 20131016 in Buenos Aires Argentina
Newest topic of spider 20131016 in Buenos Aires ArgentinaNewest topic of spider 20131016 in Buenos Aires Argentina
Newest topic of spider 20131016 in Buenos Aires Argentina
 
Supercharging MySQL and MariaDB with Plug-ins (SCaLE 12x)
Supercharging MySQL and MariaDB with Plug-ins (SCaLE 12x)Supercharging MySQL and MariaDB with Plug-ins (SCaLE 12x)
Supercharging MySQL and MariaDB with Plug-ins (SCaLE 12x)
 
M|18 How MariaDB Server Scales with Spider
M|18 How MariaDB Server Scales with SpiderM|18 How MariaDB Server Scales with Spider
M|18 How MariaDB Server Scales with Spider
 
MySQL Shell for Database Engineers
MySQL Shell for Database EngineersMySQL Shell for Database Engineers
MySQL Shell for Database Engineers
 
Configuring workload-based storage and topologies
Configuring workload-based storage and topologiesConfiguring workload-based storage and topologies
Configuring workload-based storage and topologies
 
Transparent sharding with Spider: what's new and getting started
Transparent sharding with Spider: what's new and getting startedTransparent sharding with Spider: what's new and getting started
Transparent sharding with Spider: what's new and getting started
 
Introduction to Spark
Introduction to SparkIntroduction to Spark
Introduction to Spark
 
Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2Configuring MongoDB HA Replica Set on AWS EC2
Configuring MongoDB HA Replica Set on AWS EC2
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)
 
Introduction to MariaDB
Introduction to MariaDBIntroduction to MariaDB
Introduction to MariaDB
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
MariaDB Platform for hybrid transactional/analytical workloads
MariaDB Platform for hybrid transactional/analytical workloadsMariaDB Platform for hybrid transactional/analytical workloads
MariaDB Platform for hybrid transactional/analytical workloads
 
The Adventure: BlackRay as a Storage Engine
The Adventure: BlackRay as a Storage EngineThe Adventure: BlackRay as a Storage Engine
The Adventure: BlackRay as a Storage Engine
 
.NET RDF APIs
.NET RDF APIs.NET RDF APIs
.NET RDF APIs
 
Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2Sunshine php my sql 8.0 v2
Sunshine php my sql 8.0 v2
 
Ae31225230
Ae31225230Ae31225230
Ae31225230
 
My sql storage engines
My sql storage enginesMy sql storage engines
My sql storage engines
 
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
MariaDB Enterprise & MariaDB Enterprise Cluster - MariaDB Webinar July 2014
 
My sql fabric webinar tw2
My sql fabric webinar tw2My sql fabric webinar tw2
My sql fabric webinar tw2
 
Apache Spark Tutorial
Apache Spark TutorialApache Spark Tutorial
Apache Spark Tutorial
 

More from Kentoku

Spiderの最新動向 20131009
Spiderの最新動向 20131009Spiderの最新動向 20131009
Spiderの最新動向 20131009
Kentoku
 
Spiderの最新動向 20130419
Spiderの最新動向 20130419Spiderの最新動向 20130419
Spiderの最新動向 20130419
Kentoku
 
Mroonga 20121129
Mroonga 20121129Mroonga 20121129
Mroonga 20121129
Kentoku
 
Mroonga unsupported feature_20111129
Mroonga unsupported feature_20111129Mroonga unsupported feature_20111129
Mroonga unsupported feature_20111129
Kentoku
 
Introducing mroonga 20111129
Introducing mroonga 20111129Introducing mroonga 20111129
Introducing mroonga 20111129
Kentoku
 
Spider DeNA Technology Seminar #2
Spider DeNA Technology Seminar #2Spider DeNA Technology Seminar #2
Spider DeNA Technology Seminar #2
Kentoku
 
Advanced Sharding Techniques with Spider (MUC2010)
Advanced Sharding Techniques with Spider (MUC2010)Advanced Sharding Techniques with Spider (MUC2010)
Advanced Sharding Techniques with Spider (MUC2010)
Kentoku
 

More from Kentoku (20)

An issue of all slaves stop replication
An issue of all slaves stop replicationAn issue of all slaves stop replication
An issue of all slaves stop replication
 
How to migrate_to_sharding_with_spider
How to migrate_to_sharding_with_spiderHow to migrate_to_sharding_with_spider
How to migrate_to_sharding_with_spider
 
MariaDB 10.3から利用できるSpider関連の性能向上機能・便利機能ほか
MariaDB 10.3から利用できるSpider関連の性能向上機能・便利機能ほかMariaDB 10.3から利用できるSpider関連の性能向上機能・便利機能ほか
MariaDB 10.3から利用できるSpider関連の性能向上機能・便利機能ほか
 
Spiderストレージエンジンの使い方と利用事例 他ストレージエンジンの紹介
Spiderストレージエンジンの使い方と利用事例 他ストレージエンジンの紹介Spiderストレージエンジンの使い方と利用事例 他ストレージエンジンの紹介
Spiderストレージエンジンの使い方と利用事例 他ストレージエンジンの紹介
 
Mroonga 20141129
Mroonga 20141129Mroonga 20141129
Mroonga 20141129
 
MariaDB Spider Mroonga 20140218
MariaDB Spider Mroonga 20140218MariaDB Spider Mroonga 20140218
MariaDB Spider Mroonga 20140218
 
Mroonga 20131129
Mroonga 20131129Mroonga 20131129
Mroonga 20131129
 
Spiderの最新動向 20131009
Spiderの最新動向 20131009Spiderの最新動向 20131009
Spiderの最新動向 20131009
 
Spiderの最新動向 20130419
Spiderの最新動向 20130419Spiderの最新動向 20130419
Spiderの最新動向 20130419
 
Mroonga 20121129
Mroonga 20121129Mroonga 20121129
Mroonga 20121129
 
Mroonga unsupported feature_20111129
Mroonga unsupported feature_20111129Mroonga unsupported feature_20111129
Mroonga unsupported feature_20111129
 
Introducing mroonga 20111129
Introducing mroonga 20111129Introducing mroonga 20111129
Introducing mroonga 20111129
 
hs_spider_hs_something_20110906
hs_spider_hs_something_20110906hs_spider_hs_something_20110906
hs_spider_hs_something_20110906
 
Spider HA 20100922(DTT#7)
Spider HA 20100922(DTT#7)Spider HA 20100922(DTT#7)
Spider HA 20100922(DTT#7)
 
Charms of MySQL 20101206(DTT#7)
Charms of MySQL 20101206(DTT#7)Charms of MySQL 20101206(DTT#7)
Charms of MySQL 20101206(DTT#7)
 
Introducing Spider 20101206(DTT#7)
Introducing Spider 20101206(DTT#7)Introducing Spider 20101206(DTT#7)
Introducing Spider 20101206(DTT#7)
 
Spider DeNA Technology Seminar #2
Spider DeNA Technology Seminar #2Spider DeNA Technology Seminar #2
Spider DeNA Technology Seminar #2
 
Advanced Sharding Techniques with Spider (MUC2010)
Advanced Sharding Techniques with Spider (MUC2010)Advanced Sharding Techniques with Spider (MUC2010)
Advanced Sharding Techniques with Spider (MUC2010)
 
Spider Performance Test(Bench Mark04242009)
Spider Performance Test(Bench Mark04242009)Spider Performance Test(Bench Mark04242009)
Spider Performance Test(Bench Mark04242009)
 
Spider Shibuya.pm #12
Spider Shibuya.pm #12Spider Shibuya.pm #12
Spider Shibuya.pm #12
 

Recently uploaded

➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
amitlee9823
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
MarinCaroMartnezBerg
 

Recently uploaded (20)

➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men  🔝Bangalore🔝   Esc...
➥🔝 7737669865 🔝▻ Bangalore Call-girls in Women Seeking Men 🔝Bangalore🔝 Esc...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 

Sharding with spider solutions 20160721

  • 1. Sharding with Spider solutions Spiral-Arms Kentoku SHIBA
  • 2. What is the Spider Storage Engine? Spider is a Storage Engine. Spider Storage Engine is a plugin of MariaDB/MySQL. Spider tables can be used on remote MariaDB/MySQL/OracleDB tables as local tables. And Spider can create database sharding by using table partitioning feature.
  • 3. What is Spider Storage Engine Spider is bundled in MariaDB from 10.0.4.
  • 4. Using Spider dividing huge data into multiple servers 1. High traffic processing(DB sharding) 2. Parallel processing You can use 3. multiple backend databases for different application as one database through Spider.
  • 5. SPIDER (MySQL/MariaDB) SPIDER (MySQL/MariaDB) Spider structure sample of database sharding DB1 tbl_a1 1.Request 2.Just connect to spider 3.Response DB2 DB3 AP SPIDER (MySQL/MariaDB) An application can use all databases by only connecting to one database. APAP AP AP tbl_a2 tbl_a3
  • 6. How to use Spider (1/5) 1. Install Spider bundled with MariaDB/MySQL. 2. Login MariaDB/MySQL then install Spider as a plugin. (execute install_spider.sql) 3. Create Spider table.
  • 7. How to use Spider (2/5) Create one to one Spider table. CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT ' table "rt1", database "test", port "3306", host "host name of data node", user "user name for data node", password "password for data node" '; Set engine name to “Spider” and write connect information (and parameter) in the comment.
  • 8. How to use Spider (3/5) You can create Spider tables without column definitions in MariaDB. In this case Spider gets the column definition from data node. CREATE TABLE t1 ENGINE=spider DEFAULT CHARSET=utf8 COMMENT ' table "rt1", database "test", port "3306", host "host name of data node", user "user name for data node", password "password for data node" ';
  • 9. How to use Spider (4/5) Create one to many (sharding) Spider table CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT 'table "rt1", database "test", port "3306", user "user name for data node", password "password for data node"' PARTITION BY RANGE(c1) ( PARTITION p0 VALUES LESS THAN (100000) COMMENT 'host "h1"', PARTITION p1 VALUES LESS THAN (200000) COMMENT 'host "h2"', PARTITION p2 VALUES LESS THAN (300000) COMMENT 'host "h3"', PARTITION p3 VALUES LESS THAN MAXVALUE COMMENT 'host "h4"' ); Write shared connect information to table comment, shard specific connect information to partition comment.
  • 10. How to use Spider (5/5) You can use “CREATE SERVER” statement for defining connection information. CREATE SERVER srv1 FOREIGN DATA WRAPPER mysql HOST 'host name of data node', DATABASE 'test', USER 'user name for data node', PASSWORD 'password for data node', PORT 3306 ; You can use create server definition by writing “server” parameter into table/partition comment. CREATE TABLE t1( c1 int, c2 varchar(100), PRIMARY KEY(c1) )ENGINE=spider DEFAULT CHARSET=utf8 COMMENT 'table "rt1", server "srv1"';
  • 12. Spider’s other features Redundancy You can choose redundant level per table/partition. Fault Tolerance You can use not only Spider’s fault tolerant feature but also other MySQL fault tolerance solutions. Fulltext/Geo search feature (with table partitioning, available for patched MariaDB) You can use backend Fulltext/Geo search feature transparently.
  • 13. Spider’s other features NoSQL feature (not available for MariaDB yet) You can use HandlerSocket for Spider. OracleDB connecting You can use OracleDB for data node. Note: You need to build from source code for using this feature Parallel searching (available for patched MariaDB) You can search sharded table by parallel.
  • 14. Spider’s other features Direct updating (available for patched MariaDB) Improve updating performance. Direct aggregating (available for patched MariaDB) Improve aggregating(group by) performance. Engine condition pushdown (with table partitioning, available for patched MariaDB) Improve searching with full-scan performance.
  • 15. Spider’s other features Multi Range Read (include Batched Key Access) (with table partitioning, available for patched MariaDB) Improve searching with join performance.
  • 16. Introducing other plugin which is combined with Spider in many cases
  • 17. 1. Vertical Partitioning Storage Engine 2. HandlerSocket Plugin 3. Mroonga Storage Engine Other plugins
  • 18. Vertical Partitioning Storage Engine Vertical Partitioning (VP) Storage Engine’s main features 1. Column level partitioning. 2. Works like a view of one to one relation tables. Possible to direct access to child tables. But, VP table can use as a table including insert statement. 3. For using different sharding (horizontal partitioning) rules case by case. 4. Support online copying data between child tables.
  • 19. Structure sample of using different sharding rules (1/2) DB2 tbl_a 1.Request 3.Response DB3 tbl_a DB4 tbl_a APAPAP AP AP DB1 tbl_a (vp) DB5 tbl_a Partition by col_a tbl_a1(spider) Partition by col_b tbl_a2(spider) select … from tbl_a where col_a = 1
  • 20. Structure sample of using different sharding rules (2/2) DB2 tbl_a 1.Request 3.Response DB3 tbl_a DB4 tbl_a APAPAP AP AP DB1 tbl_a (vp) DB5 tbl_a Partition by col_a tbl_a1(spider) Partition by col_b tbl_a2(spider) select … from tbl_a where col_b = 1
  • 21. 1. Vertical Partitioning Storage Engine 2. HandlerSocket Plugin 3. Mroonga Storage Engine Other plugins
  • 22. HandlerSocket Plugin Handlersocket (HS) Plugin’s main features 1. Offering high-speed NoSQL access to MySQL. 2. Offering NoSQL access to sharded servers by combining with Spider. Handlersocket is developed by Akira Higuchi. https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL Patched version for Spider is bundled with Spider bundled MySQL. http://spiderformysql.com/download_spider.html
  • 23. 1. Vertical Partitioning Storage Engine 2. HandlerSocket Plugin 3. Mroonga Storage Engine Other plugins
  • 24. Mroonga Storage Engine (1/2) Mroonga Storage Engine’s main features 1. Offering high-speed FULLTEXT search. 2. Offering high-speed GEO search. 3. High-speed updating with multiple thread searching. (lock-free model) 4. Support CJK languages.
  • 25. Mroonga Storage Engine (2/2) Mroonga Storage Engine’s main features 5. You can use to add FULLTEXT/GEO search for other storage engines. 6. Offering FULLTEXT/GEO search to sharded servers by combining with Spider. Mroonga’s documentation is available. http://mroonga.github.com/
  • 27. The feature roadmap of Spider Spring 2016 - Recovering statistics information at startup tables. (Improving startup phase of MariaDB) DONE binary http://spiderformysql.com/downloads/spider-3.3/mariadb-10.1.12- spider-3.3.8-vp-1.1-linux-x86_64-glibc25b.tgz source code http://spiderformysql.com/downloads/spider-3.3/mariadb-10.1.12- spider-3.3.8-vp-1.1b.tgz - Reducing number of threads for collecting statistics information from data nodes. (Reduce memory usage)
  • 28. The feature roadmap of Spider Summer 2016 - Direct join on data node part1. (for simple joined SQL) (not include partitioned table and redundant table) - Auto repair broken spider system table. - Direct join on data node part2. (for simple joined SQL) (include partitioned table and not include redundant table) Autumn 2016 - Auto XA recovery and commit/rollback on startup phase of MariaDB. - Direct join on data node part3. (for simple joined SQL) (include partitioned table and redundant table)