+ All Categories
Home > Documents > MySQL Cluster - visão geral

MySQL Cluster - visão geral

Date post: 14-May-2015
Category:
Upload: mysql-brasil
View: 2,376 times
Download: 4 times
Share this document with a friend
Description:
O MySQL Cluster é um produto derivado do popular MySQL Server que é o "M" do LAMP stack. Trata-se de um banco de dados distribuído com arquitetura shared-nothing e que pode oferecer 99,999% de disponibilidade e performance superior a 1 bilhão de escritas por minuto. Nesta apresentação abordaremos as principais características do MySQL Cluster, suas capacidades de alta-disponibilidade, desempenho, escalabilidade, conformidade com o modelo ACID, flexibilidade das interfaces NoSQL e geo-replicação multi-master. Falaremos também de alguns casos de sucesso como Playful Play e PayPal e um pequeno guia de como começar a utilizar o MySQL Cluster.
Popular Tags:
62
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1 Airton Lastori [email protected] 05-jul-2013 MySQL Cluster - visão geral
Transcript
Page 1: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1

Airton Lastori [email protected]

05-jul-2013

MySQL Cluster - visão geral

Page 2: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 2

@MySQLBR

meetup.com/MySQL-BR

facebook.com/MySQLBR

MySQLBR

Page 3: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 3

Agenda

O que é o MySQL Cluster?

Quando usar?

Como funciona?

Como começar?

Perguntas?

Page 4: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 4

O que é o MySQL Cluster?

Page 5: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 5

Monty, David e Allan:

UNIREG,MyISAM e mSQL.

Interface SQL com

Arquitetura Plugável.

Surge a MySQL AB.

Mais performance,

drivers, engines.

GPL, LAMP Stack.

Cresce o ecossistema.

Versão 3.

Logo e website.

InnoDB para

transações ACID.

Vale do Silício.

Versão 4.

MySQL Cluster é adquirido da Alzato-Ericsson

pela MySQL AB.

Versão 5.

InnoBase OY é adquirida pela

Oracle.

MySQL AB é adquirida pela

Sun.

Ferramentas Enterprise.

Sun Microsystems é adquirida pela

Oracle.

Versões 5.5, 5.6 e Cluster

7.1, 7.2 e 7.3.

’85…

…’94

’95…

…’96 ’97…

…’00

’01…

…’02

’03…

…’04

’05…

…’09

’10…

…’13

Histórico do MySQL

Page 6: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 6

2008

até 4 CPU

MySQL 5.0

MySQL AB

até 16 CPU

MySQL 5.1

Sun

até 32 CPU

MySQL 5.5

Oracle

até 48 CPU

MySQL 5.6

Evolução da escalabilidade do MySQL

2009 2010 2013

Page 7: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 7

MySQL Database Community Server

MySQL Cluster

MySQL Workbench e Utilities

MySQL Connectors e Proxy

Documentação não GPL

Forums, Lists, Bugs, Blogs…

Compromisso Oracle com MySQL Community Portfólio disponível para download e uso sob GPL

Page 8: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 8

Connection Pool, SQL Interface, Parser, Optimizer, Caches

Enterprise Management

Services and Utilities

Backup & Recovery

Monitor

Workbench

Utilities

Clients & Connectors Native C API, JDBC, ODBC, .Net, PHP, Ruby, Python, VB, Perl mysqld

Clients and Apps

Arquitetura MySQL Server

Storage Engines

InnoDB, MyISAM, Memory, Archive, Cluster (NDB API), etc…

Filesystems, Files & Logs

Data, Index, Logs…

Page 9: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 9

Storage Engines

MyISAM InnoDB NDB Cluster

Transações ✖ ✔ ✔

Nível de Lock Tabela Linha Linha

Replicação Assíncrona ou

Semi-síncrona

Assíncrona ou

Semi-síncrona, crash-safe

Síncrona, Multi-master,

crash-safe sem SPOF

Foreign Keys ✖ ✔ ✔

Full-text indexes ✔ ✔ ✖

Compressão de dados somente Leitura ✔ ✖

Caches somente Índices Dados e Índices Dados e Índices

Suporte Geospacial Tipos de Dados e Índices somente Tipos de Dados somente Tipos de Dados

Limite de armazenamento 256TB 64TB 384EB (~3TB em RAM)

dev.mysql.com/doc/refman/5.5/en/storage-engines.html

Page 10: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 10

O que NÃO é o MySQL Cluster

1. SGBD de uso geral, “bala de prata”

• Tabelas NDB ainda não são recomendadas para todos tipos de aplicações / workloads

• NDB ainda não é 100% compatível com InnoDB, mas podem ser usados em conjunto

• MySQL Cluster requer relativamente mais memória RAM

2. Cluster do tipo Shared-All que requer Shared Storage

• Como, por exemplo, Oracle RAC

• Cada Data Node tem sua unidade de armazenamento independente

3. Replicação tradicional do MySQL Server

• MySQL Cluster possui seu próprio mecanismo interno de replicação síncrona

• Também pode ser usado opcionalmente em conjunto com replicação externa tradicional do MySQL

4. “Apenas” o MySQL Server (mysqld)

• MySQL Cluster possui outros componentes: ndbd, ndb_mgmd

5. Produto de código fechado

• Possui edição community (GPL) e carrier-grade-edition (suporte e ferramentas comerciais)

Page 11: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 11

Alguns Clientes MySQL Cluster

Page 12: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 13

Quando devo usar

MySQL Server ou MySQL Cluster?

Page 13: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 14

Na escolha da solução, considerar...

Performance, escalabilidade, disponibilidade,

flexibilidade, estabilidade, segurança, custo total de

propriedade, conhecimento da equipe...

Ah! Não esqueça da fase de produção, dos DBAs...

ferramentas, suporte, rotinas de manutenção.

Page 14: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 15

MySQL Cluster

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 15: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 16

Opções certificadas de Alta-Disponibilidade

Page 16: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 17

Tipo de aplicação e arquiteturas recomendadas

Aplicações Replicação com

InnoDB

Clusterização SO /

Virtualização

Shared-nothing,

Geo-replicação

E-Commerce / Trading ✔ ✔

Session Management ✔ ✔

User Authentication / Accounting ✔ ✔

Feeds, Blogs, Wikis ✔

Data Refinery ✔

OLTP ✔ ✔

Data Warehouse/BI ✔ ✔

Content Management ✔ ✔

CRM / SCM ✔

Collaboration ✔ ✔

Packaged Software ✔

Telco Apps (HLR/HSS/SDP…) ✔

Page 17: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 18

InnoDB vs NDB Cluster

dev.mysql.com/doc/refman/5.6/en/mysql-cluster-compared.html

Preferível InnoDB

• Foreign keys

• Full table scans

• Datasets ou linhas muito grandes, transações mais longas

• Transações com isolamento diferente de READ COMMITTED

Preferível NDB Cluster

• Escalabilidade de escrita

• 99,999% uptime

• Adição de nós online, manutenção do esquema online

• Opções de APIs NoSQL

• Real-time performance

• Uso limitado de colunas BLOB

• Foreign keys são suportadas, porém podem causar impacto na performance em condições extremas

Page 18: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 20

Cluster 1

Synchronous

replication

Cluster 2

InnoDB InnoDB InnoDB

Asynchronous

replication

InnoDB + NDB Cluster Opções com Replicação

Replicação síncrona entre os grupos de nós para HA

Geo-Replicação assíncrona entre nós remotos

NDB para redundância

geográfica

Replicação assíncrona entre Storage Engines

diferentes para aplicações

especializadas como geração

de relatórios

Page 19: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 22

Como o MySQL Cluster funciona?

Page 20: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 23

Data Layer

Application Layer

Management

mgm_ndbd

MySQL Cluster: arquitetura simplificada

mysqld

ndbd ndbd ndbd ndbd

Clients

Page 21: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 24

Como escalar leituras e escritas?

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 22: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 25

Scale Out (horizontal)

• Adicionar mais servidores para

aumentar performance

• MySQL adota esta abordagem

em sistemas altamente

escaláveis em hardware

commodity (Intel / AMD)

Scale Up (vertical)

• Trocar por hardware mais

poderoso, adicionar memória,

CPU

• Outras soluções normalmente

usam hardware proprietário

(SMP)

Estratégias para escalabilidade

Page 23: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 26

Escalabilidade horizontal

Replicação MySQL

• método mais simples e mais comum

• indicado para aplicações de LEITURA intensiva

• problemas com cache duplicado em aplicações com datasets grandes

Particionamento Funcional

• dividir a carga em múltiplos nós, com responsabilidades distintas

• os nós podem ter redundância via replicação para alta-disponibilidade

• normalmente não é transparente para a aplicação e também recorre ao scale up para cada database funcional, o que impõe limites

Data Sharding

• método de maior sucesso para escalar aplicações MySQL de grande porte hoje

• dados compartilhados em tabelas/caches globais, SOA

• difícil de adaptar aplicações legadas

Page 24: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 27

Replicação MySQL: escalando LEITURAS

• Divisão de leituras e escritas (R/W Split)

• É possível adicionar mais slaves, dividir a carga

Leituras

Aplicação

Master Slave

Escritas & Leituras Leituras

Slave

Page 25: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 28

Data Node 1

Data Node 2

Data Node 3

Data Node 4

Table T1

P2

P3

P4

P1

Data Sharding: escalando ESCRITAS

Page 26: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 29

Data Node 1

Data Node 2

F1

Data Node 3

Data Node 4

Table T1

P2

P3

P4

P1

Data Sharding: escalando ESCRITAS

Page 27: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 30

Data Node 1

Data Node 2

F1

F3

Data Node 3

Data Node 4

Table T1

P2

P3

P4

P1

Data Sharding: escalando ESCRITAS

Page 28: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 31

Data Node 1

Data Node 2

F1

F3

Data Node 3

Data Node 4

F2

Table T1

P2

P3

P4

P1

Data Sharding: escalando ESCRITAS

Page 29: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 32

Data Node 1

Data Node 2

F1

F3

Data Node 3

Data Node 4

F2

F4

Table T1

P2

P3

P4

P1

Data Sharding: escalando ESCRITAS

Page 30: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 33

MySQL Cluster Data Nodes

Data Layer

Application Layer

Management

mgm_ndbd

MySQL Cluster: auto-sharding

Table T1

P2

P3

P4

P1 F1

F3

F3

F1 F2

F4

F4

F2

Management

mgm_ndbd

mysqld mysqld

ndbd ndbd ndbd ndbd

Clients

Page 31: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 34

Como garantir a alta-disponibilidade?

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 32: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 35

Data Node 1

Data Node 2

F1

F1

Data Node 3

Data Node 4

Table T1

P2

P3

P4

P1

Data Sharding + Replicação

Page 33: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 36

Data Node 1

Data Node 2

F1 F3

F1

Data Node 3

Data Node 4

Table T1

P2

P3

P4

P1 F3

Data Sharding + Replicação

Page 34: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 37

Data Node 1

Data Node 2

F1 F3

F3 F1

Data Node 3

Data Node 4

F2

F2

Table T1

P2

P3

P4

P1

Alta-Disponibilidade: Replicação Síncrona

Page 35: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 38

Data Node 1

Data Node 2

F1 F3

F3 F1

Data Node 3

Data Node 4

F2 F4

F4 F2

Table T1

P2

P3

P4

P1

Data Sharding + Replicação

Page 36: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 39

Data Node 1

Data Node 2

F1 F3

F3 F1

Data Node 3

Data Node 4

F2 F4

F4 F2

Gro

up

1

Table T1

P2

P3

P4

P1

Data Sharding + Replicação

Gro

up

2

Page 37: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 40

Data Node 1

Data Node 2

F1 F3

F3 F1

Data Node 3

Data Node 4

F2 F4

F4 F2

Gro

up

1

Table T1

P2

P3

P4

P1

Data Sharding + Replicação

Gro

up

2

Page 38: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 41

MySQL Cluster Data Nodes

Data Layer

Application Layer

Management

mgm_ndbd

MySQL Cluster: alta-disponibilidade Table T1

F1

F3

F3

F1 F2

F4

F4

F2

Management

mgm_ndbd

mysqld mysqld

ndbd ndbd ndbd ndbd

Clients

Page 39: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 42

Como garantir a durabilidade e performance?

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 40: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 43

In-Memory, parallel, AQL, Pushdown Joins

1. Memória RAM mais barata e redes mais rápidas

• Escrever em memória RAM remota é mais rápido que em disco local

2. Múltiplas threads trabalhando em paralelo em diversas máquinas

3. Adaptative Query localization

4. Pushdown Joins

Page 41: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 44

•2 milhões usuários, com 30.000 novos

usuários por dia

•10.000 usuários concorrentes

•10.000 Transações Por Segundo

•99.999% uptime

“The MySQL support service has

been essential in helping us for

troubleshooting and giving

recommendations for the production

cluster.” Carlos Morales (DBA), Playfulplay.com

blogs.oracle.com/MySQL/entry/mysql_cluster_powers_el_chavo

Caso de sucesso

Page 42: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 45

Flexibilidade na interação com os dados

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 43: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 46

MySQL Cluster Data Nodes

Data Layer

Clients

Application Layer

Management

MySQL Cluster: NoSQL APIs

Table T1

P2

P3

P4

P1 F1

F3

F3

F1 F2

F4

F4

F2

Management

Page 44: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 47

Os mesmos dados

acessados

simultaneamente

através de interfaces

SQL e NoSQL

APIs de Acesso aos Dados

Page 45: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 48

Bônus para o desenvolvedor

Escreva via NoSQL (schemaless)

e consulte via SQL

Page 46: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 49

<estado:SP,Campinas>

prefix key value

<estado:SP,Campinas>

key value

Prefix Table Key-col Val-col policy

estado: mapa.cidades sigla_estado cidade cluster

Config tables

sigla_estado ... cidade ...

SP ... Campinas ...

Tabela cidades do DB mapa

visão da Aplicação

visão MySQL Cluster

Cluster & Memcached Schema configurável

SELECT * FROM mapa.cidades

WHERE cidade LIKE ’C%’;

Page 47: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 50

Node.js NoSQL API MySQL Cluster 7.3 EA Acesso JavaScript nativo ao

MySQL Cluster

JavaScript do início ao fim: browser >

app > database

Leituras e escritas de objetos JavaScript

direto no MySQL Cluster

Elimina transformações SQL

Implementado como um módulo

para node.js

Integra completamente a API/library

Cluster com a aplicação web

Alta performance para aplicações e

dados distribuídos

V8 JavaScript Engine

MySQL Cluster Node.js Module

MySQL Cluster Data Nodes

Clients

Page 48: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 51

Qual API devo usar?

Page 50: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 53

Exemplos JavaScript / Node.js API

Blog:

Tutorial Getting Started with the NoSQL JavaScript / Node.js API for

MySQL Cluster

10 June 2012

blogs.oracle.com/MySQL/entry/tutorial_getting_started_with_the

Page 51: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 54

Como manter TCO baixo?

• Escalabilidade linear de Escritas e Leituras

• Elasticidade, crescimento incremental, distrib. simétrica Escalabilidade

• 99.999% de disponibilidade, 5min / ano

• Self-healing, failover menor que 1s, geo-replicação Alta Disponibilidade

• Performance em tempo real, in-memory e em disco

• Latência baixa e preditiva, acessos paralelos Alta Performance

• Modelo relacional ACID, SQL e Foreign Keys

• APIs NoSQL (C++, Java, Memcached, Node.js) Flexibilidade

• Open Source, suporte e ferramentas comerciais opcionais

• Hardware commodity Baixo TCO

Page 52: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 55

Principais componentes do TCO

1. Custo de aquisição

• Licenciamento do Software (desenvolvimento e produção)

• Hardware necessário

• Conhecimento da equipe

• Produtividade do time de desenvolvimento

2. Custo de manutenção e evolução

• Hospedagem e manutenção do hardware

• Conhecimento da equipe

• Estabilidade e maturidade do software

• Suporte do fabricante

• Produtividade: Ferramentas de gerenciamento, monitoramento e backup

• Produtividade do time de evolução do produto

Page 53: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 56

MySQL Boot Camp

Accelerated

MySQL Performance

Tuning Boot Camp

Accelerated

MySQL for Begginers

MySQL for Database

Administrators

MySQL Performance

Tuning

MySQL High Availability

MySQL Cluster

MySQL DBA

MySQL Boot Camp

Accelerated

MySQL for Developers

MySQL Performance

Tuning Boot Camp

Accelerated

MySQL for Begginers

MySQL and PHP

Developing Dynamic

Web Applicationg

MySQL Advanced Stored

Procedures

MySQLDeveloper

mysql.com/training

Certificações

Opcional

Necessário

Treinamentos e certificações

Page 54: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 58

Como começar a usar

o MySQL Cluster?

Page 55: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 59

MySQL Cluster Auto-Install

downloads.mysql.com/tutorials/cluster/mysql_wp_cluster_quickstart.pdf

Page 56: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 60

1. Download MCM/Cluster edelivery.oracle.com:

2. Unzip e execute o comando com usuário diferente de root:

MySQL Cluster Manager Para testes em uma única máquina

C:\MySQL\mcm\bin> mcmd --bootstrap

MySQL Cluster Manager 1.1.2 started

Connect to MySQL Cluster Manager by running “C:\MySQL\mcm\bin\mcm" -a NOVA:1862

Configuring default cluster 'mycluster'...

Starting default cluster 'mycluster'...

Cluster 'mycluster' started successfully

ndb_mgmd NOVA:1186

ndbd NOVA

ndbd NOVA

mysqld NOVA:3306

mysqld NOVA:3307

ndbapi *

Connect to the database by running “C:\MySQL\mcm\cluster\bin\mysql" -h NOVA -P 3306 -u root

Page 57: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 65

Teste via MySQL Workbench

Page 59: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 68

Próximo passo: documentação

Reference Manual

Cap. 17.1, MySQL Cluster Overview

1. MySQL Cluster Core Concepts

2. MySQL Cluster Nodes, Node Groups, Replicas, and Partitions

3. MySQL Cluster Hardware, Software, and Networking

Requirements

4. MySQL Cluster Development History

5. MySQL Server Using InnoDB Compared with MySQL Cluster

6. Known Limitations of MySQL Cluster

dev.mysql.com/doc/refman/5.6/en/mysql-cluster.html

Page 60: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 69

Sumário

O MySQL Cluster é um produto derivado do popular MySQL Server que é o "M" do LAMP

stack.

Trata-se de um banco de dados distribuído com arquitetura shared-nothing e que pode

oferecer 99,999% de disponibilidade e performance superior a 1 bilhão de escritas por minuto.

Nesta apresentação vimos as principais características do MySQL Cluster, suas capacidades

de alta-disponibilidade, desempenho, escalabilidade, conformidade com o modelo ACID,

flexibilidade das interfaces NoSQL e geo-replicação multi-master.

Vimos também de alguns casos de sucesso como Playful Play e PayPal e um pequeno guia

de como começar a utilizar o MySQL Cluster.

Instale e comece a usar em menos de 15min. Use e abuse da documentação!

Page 61: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 70

@MySQLBR

meetup.com/MySQL-BR

facebook.com/MySQLBR

Obrigado!

Page 62: MySQL Cluster - visão geral

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 71

Perguntas?

MySQL Cluster


Recommended