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 Casual Talks Vol.3 〜カジュアルだよこわくないよ〜
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
n0ts
April 19, 2012
Technology
100
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MySQL Casual Talks Vol.3 〜カジュアルだよこわくないよ〜
MySQL Casual Talks Vol.3
n0ts
April 19, 2012
More Decks by n0ts
See All by n0ts
はじめての Gatling
n0ts
0
68
Other Decks in Technology
See All in Technology
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
200
夫婦で子育てするための育児標準化
codmoninc
PRO
0
330
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
その Valkey 使いこなしていますか?
onk
PRO
5
1.5k
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
860
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
Rust で関数型ドメインモデリング
takonda
0
140
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
1.1k
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
340
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Building Flexible Design Systems
yeseniaperezcruz
330
41k
What's in a price? How to price your products and services
michaelherold
247
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Mobile First: as difficult as doing things right
swwweet
225
10k
Optimizing for Happiness
mojombo
378
71k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
A Modern Web Designer's Workflow
chriscoyier
699
190k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Transcript
σʔληϯλʔҠߦʹ͍ɺ MySQLΛΧδϡΞϧʹ ΞοϓάϨʔυ͓ͨ͠ MySQL Casual Talks Vol.3 ʙΧδϡΞϧͩΑ͜Θ͘ͳ͍Αʙ 2012/04/19 Naoya
Nakazawa@n0ts ຊΦϥΫϧ ੨ࢁηϯλʔ Thursday, April 19, 12
ࣗݾհ Thursday, April 19, 12
n Naoya Nakazawa n @n0ts n ຊޠϒϩά n http://www.sssg.org/blogs/naoya/ n
ແॴଐ n έʔϒϦϯά͔ΒΞϓϦ·Ͱ Thursday, April 19, 12
αʔό/ΠϯϑϥΤϯδχΞཆಡຊ ཧ/ࢹฤ ઈࢍൃചதʂʂʂ Thursday, April 19, 12
ࠓͷ͓ Thursday, April 19, 12
n େਓͷࣄͰɺ͋ΔαʔϏεΛσʔληϯ λʔҠߦ͢Δ͜ͱʹͳΓ·ͨ͠ n ͦͷ͍ͭͰʹ MySQL ΛΞοϓάϨʔυ͠ ͨͷͰɺͦͷ͓Λ͠·͢ Thursday, April
19, 12
ͦͷલʹ Thursday, April 19, 12
લճͷMySQL Casual Talks Vol.2 Thursday, April 19, 12
http://d.hatena.ne.jp/oranie/20110810/1312969238 ʮMySQL 5.0 -> 5.5 ͷΞοϓάϨʔυ ϓϥεͳΜ͔ʯ @oranie Thursday, April
19, 12
αʔϏεΛఀࢭͰ͖Δ߹Ͱͷɺ MySQL 5.0͔Β5.5ʹ ΞοϓάϨʔυ͢ΔͨΊͷํ๏ Thursday, April 19, 12
ͯϒ͓ئ͍͠·͢ʂʂʂ Thursday, April 19, 12
ࠓɺαʔϏε͕ࢭΊΔ ͜ͱ͕Ͱ͖ͳ͍߹ ͷMySQLΞοϓάϨʔυʹ͍ͭͯͷ ͓Λ͠·͢ Thursday, April 19, 12
αʔϏεن n ͱ͋ΔࠂܥαʔϏε n ඵؒ͋ͨΓͷϐʔΫ࣌ͷϦΫΤετ n X000 req/sec n ཧαʔό1ϥοΫఔ
n খنαʔϏε Thursday, April 19, 12
αʔόߏ ʢ؆қ൛ʣ Thursday, April 19, 12
LVS Application Server DB1 MySQL 5.0.51b DB2 MySQL 5.0.71 LVS
Master repl Slave Master Slave repl Write Read Write Read Thursday, April 19, 12
MySQL 5.0.51b? Thursday, April 19, 12
https://twitter.com/#!/nobu666/status/178350176719736832 5.0.53! InnoDB Deep Talk #1 2012/03/10 Thursday, April 19,
12
σʔληϯλʔҠߦ Thursday, April 19, 12
Thursday, April 19, 12
Thursday, April 19, 12
Ҡߦલͷαʔόߏ Thursday, April 19, 12
چDC ৽DC Application Server LVS LVS repl repl DB1 DB2
Application Server LVS LVS repl repl DB1 DB2 Thursday, April 19, 12
repl DB1 MySQL 5.0.51b چDC ৽DC Master Slave repl Master
Slave DB1 MySQL 5.1.58 ×SSL Replication SSH Port Forwarding repl DB2 MySQL 5.0.71 Master Slave repl Master Slave DB2 MySQL 5.1.58 Thursday, April 19, 12
n MySQL 5.1.58͔Β5.0.51bʹଓ͢Δͱɺ࣍ͷΤ ϥʔ͕ൃੜͨ͠ n ERROR 2026 (HY000): SSL connection
error n MasterͷόʔδϣϯΛ5.1.58ʹ͋ΘͤΔͱ͏·͘ ͍ͬͨͷͰɺόʔδϣϯͷ͔ɺ5.0ܥΛSSLର ԠϏϧυ͍ͯ͠ͳ͔ͬͨ͜ͱ͕ݪҼ͔͠Εͳ͍ SSLϨϓϦέʔγϣϯͷࣦഊ Thursday, April 19, 12
SSHϙʔτϑΥϫʔυ n ৽DC DB1 Master্ͰɺچDC DB1 MasterʹSSHτϯωϧΛ۷Δ n ssh -f
<چDC DB1 Master> -L 13306:localhost:3306 -N -4 -g n LVSܦ༝ͷͨΊɺLVS͕ΓସΘΔͱSSHτϯωϧ͕ΕΔͨΊɺ MonitͰఆظతʹSSHτϯωϧ͕ด͍ͯ͡Δ͔֬ೝ͢ΔΑ͏ʹͨ͠ n pgrepͯ͠ͳ͚ΕSSHτϯωϧΛ۷Δ؆୯ͳγΣϧεΫϦϓτ n ৽DC DB1 MasterΛɺҰ࣌తʹSlaveʹ͢Δ n mysql> CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=13306 ...; Thursday, April 19, 12
৽DCͷMySQL n MySQL SlaveͷΈϋʔυΣΞRAID0 + SSD x 4 n XFS,
deadlineεέδϡʔϥ n ެࣜͷMySQL 5.1.58 RPM n InnoDB pluginΛར༻ n InnoDBͷઃఆΛશൠతʹݟ͔ͨͬͨ͠ͷͰɺچDC্Ͱmysqldumpͨ͠ σʔλΛྲྀ͠ࠐΜͰɺ৽DC DB1 MasterΛεϨʔϒͱͨ͠ n DB2ͷํɺશҠߦޙʹఀࢭͯ͠Ҡߦͨ͠ n Ұ෦ͷςʔϒϧʹInnoDB Data CompressionΛಋೖ Thursday, April 19, 12
DCҠߦ -STEP 1- Thursday, April 19, 12
n DNSϥϯυϩϏϯʹ͢ΔʢϨδετϥ ͷ༷ͰTTLΛมߋͰ͖ͳ͔ͬͨʣ n ৽DB1ͷΞϓϦέʔγϣϯͷॻ͖ࠐΈઌ ɺSSHτϯωϧܦ༝ͰچDCͷDB1 Masterʹରͯ͠ߦ͏ Thursday, April 19,
12
چDC ৽DC Application Server LVS LVS repl repl DB1 DB2
Application Server LVS LVS repl repl DB1 DB2 Traffic Write Thursday, April 19, 12
DCҠߦ -STEP 2- Thursday, April 19, 12
n DNSϥϯυϩϏϯΛΊͯɺ৽DCͷΈ Γସ͑Δ n ϦΫΤετ͕શʹ৽DCͷΈʹͳΔ·Ͱ ͠Βͭ͘ Thursday, April 19, 12
DCҠߦ -STEP 3- Thursday, April 19, 12
1. ϦΫΤετͷ࠷গͳ͍࣌ؒଳʹɺΞϓϦέʔ γϣϯ͔Βσʔλϕʔεͷॻ͖ࠐΈΛҰ࣌తʹ ఀࢭ͢ΔʢόονͳͲ͋Θͤͯʣ 2. ৽DC DB1ͷSlaveΛMasterঢ֨ͤ͞Δ 3. ঢ֨ޙɺΞϓϦέʔγϣϯ͔Βσʔλϕʔεͷॻ ͖ࠐΈΛ࠶։ͤ͞Δ
Thursday, April 19, 12
چDC ৽DC Application Server LVS LVS repl repl DB1 DB2
Application Server LVS LVS repl repl DB1 DB2 Traffic Thursday, April 19, 12
·ͱΊ Thursday, April 19, 12
n DCҠߦதΛؚΊͯαʔϏεͷఀࢭͳ͠ n ҠߦதαʔϏε্ͷେ͖ͳԆͳ͠ n SlaveΛMasterঢ֨ͤ͞Δ͚ؒͩɺॻ͖ࠐΈ Ұ࣌ఀࢭ͚ͨ͠ΕͲαʔϏεͷఀࢭͳ͠ n ͋ΘͤͯɺMySQL 5.0ܥ͔Β5.1ܥʹ҆શʹ͔ͭ
ͳ͘ΞοϓάϨʔυͰ͖ͨ Thursday, April 19, 12
Thanks! Thursday, April 19, 12