Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
MySQL - The Old Way
Search
Gea-Suan Lin
July 29, 2012
Technology
510
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MySQL - The Old Way
Gea-Suan Lin
July 29, 2012
More Decks by Gea-Suan Lin
See All by Gea-Suan Lin
High Availability Vault Service on AWS Environment
gslin
0
7.3k
用 AWS CodeDeploy 解決程式佈署
gslin
0
480
MySQL to NoSQL & Search Engine
gslin
0
2.3k
用 Vagrant 與 Docker 拯救世界
gslin
1
350
Startup IT infrastructure: Developing and Working with AWS
gslin
8
3.8k
Talk about Percona XtraDB Cluster
gslin
0
220
API Design Optimized for Mobile Platform
gslin
9
8.9k
Use Facebook::Graph to write desktop application
gslin
2
520
COSCUP 2012 - MySQL System Stability
gslin
17
12k
Other Decks in Technology
See All in Technology
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.2k
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
900
Rust で関数型ドメインモデリング
takonda
0
170
SharedWorkerを使ったキャッシュでネイティブアプリに負けないユーザー体験を目指す
kakehashi
PRO
1
110
sue445's proposals 2026
sue445
0
120
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
190
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
170
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
400
会社説明資料
persolserverworks
0
9.8k
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
300
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
310
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Navigating Weather and Climate Data
rabernat
0
560
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Producing Creativity
orderedlist
PRO
348
41k
First, design no harm
axbom
PRO
2
1.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
エンジニアに許された特別な時間の終わり
watany
109
250k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Transcript
MySQL - The Old Way Gea-Suan Lin
Old != Bad
In this case, Old implies Reliable
Reliable
We are familiar with these issues,
We can workaround these issues
So...
First Solution
Built-in Replication
http://dev.mysql.com/ doc/refman/5.5/en/ replication.html
The Good Part
Simple
Dead Simple Setup
Dead Simple Concept
Master logs changes
Slave applies changes
The Bad Part
Async
Means...
Replication Lag
When you write data to master,
It’s possible unable to read from slave
Workaround
Always use master if you write data
The Worst Part
Application cannot write after master crash
This derives...
Second Solution
Master-Master
Two MySQL servers
Set each other as master server
The Good Part
Both MySQL servers can be written
The Bad Part
Data inconsistent
MySQL Server A TRUNCATE TABLE t; INSERT t SET i=1;
MySQL Server B TRUNCATE TABLE t; INSERT t SET i=2;
MySQL Server A TRUNCATE TABLE t; INSERT t SET i=1;
TRUNCATE TABLE t; INSERT t SET i=2; MySQL Server B TRUNCATE TABLE t; INSERT t SET i=2; TRUNCATE TABLE t; INSERT t SET i=1;
Result
MySQL Server A i=2 MySQL Server B i=1
Workaround
Write one server in normal case
Write another one when primary node fails
You can write code to handle failover
But we suggest to use Heartbeat
Heartbeat can handle this failover case
When data is inconsistent,
We can use Percona’s pt-table-sync to sync data
Third Solution
DRBD + Heartbeat
DRBD is Network-based RAID-1
Block-level mirror
Heartbeat handles High Availability
http://dev.mysql.com/ doc/refman/5.5/en/ha- drbd.html
http://dev.mysql.com/ doc/refman/5.5/en/ha- heartbeat.html
The Good Part
Data consistent
You won’t need to worry about data inconsistent issue
The Bad Part
Utilization Rate
Only one server uses to serve applications
Warm up time
When I/O rate cannot catch query rate
Conclusion
DRBD has higher down-time than other twos,
And it costs higher in server hardware
But it costs lower for SA Operations
If down-time of DRBD + Heartbeat is acceptable,
You should choose it
How much down- time ?
It depends,
Usually < 30 secs to failover
With warm up time
Possible 3~5 mins for 10GB data size ?
Thanks !