39

? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP
Page 2: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

MySQL

上海爱Gd信QS术股份有yA司

资aDBA P沈波

Page 3: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

g

云树Guard

高G用

-LA

云树Pr2xy

rBCh

高QP-

云树-1ard

COC表

高TP-

云树DT-

数T复D

数T消费

云树DMP

L体xu维管理

oEF

云树RD-

My-QL DBaa-

MDF

��������

——

云树系列

Page 4: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP
Page 5: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

•  ��%�����, . �� �(

•  ��� ��'��$���&��(

•  �������&��"#�', . !��(

Page 6: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

CONTENT- .

.

Page 7: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用考x-背景

1.crashMaster

newmaster

HA

repl

2.check 3.promote

4.sip

Page 8: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用考x

–  AS

& M– M M f

t SM l

–  S H i , i ,S M l

Page 9: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用考x

•  vs •  VS

Page 10: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

CONTENT- .

.

Page 11: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

• • • •  , .

• • 

(MySQL)

s

Page 12: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

, .L / /

:

- / (bbu,raid,bond,…)- (diskreadonly,mysqlabort_server,…)

Page 13: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

•  “

• 

Q Q

•  f fs f H

•  •  •  •  • 

Page 14: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

s

o , L // . o

–  s /

–  t , / ,

–  , – 

Page 15: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

Page 16: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

:

••• ,• , ,• ,• , / / ,

,

Page 17: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

Sa l

•  r •  fence•  ( / / )•  … Master newmaster

HA

repl

Page 18: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用覆盖的故障

•  HA • 

Page 19: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

CONTENT- .

.

Page 20: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

Page 21: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

– – 

– – 

Page 22: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

Master Slave

1.commit

2. binlog 3. relaylog

4.ACK5.enginecommit

6.commit_ok

, . )2 3 1“

1. y ss

L s2.S s

MySQL5.7( masterhang)

Page 23: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

Master Slave

1.commit

2. binlog 3. relaylog

4.ACK5.enginecommit

6.commit_ok

•  •  •  •  slavecount • 

Page 24: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

•  Binlog •  l p • 

binlog a Sbinlog “

SlaveMaster

repl

Binlog1-50

Binlog51-100

Binlog1-98

LUN1 LUN2

99-100

Page 25: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

ScsiPR

SlaveMaster

repl

Binlog1-50

Binlog51-100

Binlog1-98

LUN1 LUN2

99-100

Page 26: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

–  B–  B– . ( B

Page 27: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

-LA的M义

•  SLA BSLA Bservicelevelagreement MSLA

•  SLA f“ M

Page 28: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

-LA的M义

S

P1 0 <60s

P2 0 <10

P3 10 0 >10

PE1 >0 <60s

PE2 >0 <10

PE3 >0 >10

Page 29: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

-LA的M义

S

T1 100

10 <10

T2 1060s

10 <11

T3 1015

10 <25

TE 10” 15 ,

- >25

M

Page 30: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

–  (– 

Page 31: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

Master Slave

HA

replMaster Slave2

HA2

repl

HA1 HA3Slave1

HA

leader

Hamgr

( )

Page 32: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型

Master Slave

HA2

repl

HA3Aleader

HA1

HA_agentHA_agent

B

Master Slave2

HA2

repl

HA1 HA3

B

Page 33: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用方案选型-N结

•  &

a •  &

SLA• 

Page 34: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

FAQ

n • 

BS S. S .

• S

–  M session–  M session

Page 35: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

FAQ

Master Slave

1.Session1

2. binlog 3. relaylog

4.ACK5.enginecommit

commit_ok

S

6.Session2

•  •  f

Page 36: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

FAQ1

SlaveMaster

repl

Binlog1-50

Binlog51-100

Binlog1-98

LUN1 LUN2

99-100

• 

•  f

Page 37: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

FAQ2

or• 

SQL

•  binlog

S crashA master

Page 38: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

高G用R们还做了更多

1. IP2. N 3.N 4.5.6. 7. x

i

a

SLA

Page 39: ? MySQL ¯ $ñbos.itdks.com/82c9d30a8cf84924a885977db95c21f0.pdfg 云树 Guard 高G用 -LA 云树Pr2xy rBCh 高QP- 云树-1ard COC表 高TP- 云树DT- 数T复D 数T消费 云树DMP

Thanks