Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
リブセンスインフラ概要 vol.2 #TechLunch
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Livesense Inc.
PRO
April 21, 2014
Technology
89
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
リブセンスインフラ概要 vol.2 #TechLunch
リブセンスインフラ概要 vol.2
2012/08/01 (水) @ Livesense TechLunch
発表者:鈴木 翔一郎
Livesense Inc.
PRO
April 21, 2014
More Decks by Livesense Inc.
See All by Livesense Inc.
Rubyはただの⾔語に⾮ず
livesense
PRO
0
500
28新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
120
27新卒_総合職採用_会社説明資料
livesense
PRO
0
6.7k
27新卒_Webエンジニア職採用_会社説明資料
livesense
PRO
0
12k
株式会社リブセンス・転職会議 採用候補者様向け資料
livesense
PRO
0
530
株式会社リブセンス 会社説明資料(報道関係者様向け)
livesense
PRO
1
1.8k
データ基盤の負債解消のためのリプレイス
livesense
PRO
0
670
26新卒_総合職採用_会社説明資料
livesense
PRO
0
13k
株式会社リブセンス会社紹介資料 / Invent the next common.
livesense
PRO
2
72k
Other Decks in Technology
See All in Technology
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
170
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
35分でわかるEffective Platform Engineering
nwiizo
5
590
【GCC2026】大規模言語モデルを活用した内製検索サービスの社内展開や業務活用
bandainamcostudios
PRO
0
470
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
220
トークンマネジメントでAIにとって働きやすい環境を実現する
hikaruegashira
0
130
AI for Science時代を切り開く、政府の次世代HPC戦略の展望
gpuunite_official
0
200
コーチングの奥義 何もしないテクニック
jinwatanabe
0
140
ソフトウェアサプライチェーンの構造的リスクとコンテナ環境の保護
kyohmizu
5
830
長期運営で肥大化したExcelマスターデータの解消に向けた移行事例
gree_tech
PRO
0
100
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
130
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
360
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
510
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
270
Building Applications with DynamoDB
mza
96
7.2k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
280
Automating Front-end Workflow
addyosmani
1369
210k
Why Our Code Smells
bkeepers
PRO
340
58k
Designing for Performance
lara
611
70k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Balancing Empowerment & Direction
lara
6
1.2k
Transcript
リブセンスインフラ概要 vol 2 Database 負荷分散
RDBMS • Oracle – 実行計画など細かな事を意識しなくても、それほどクエリ に長い時間がかからない事が多い – アーカイブログを使用する事によってデータロスが起きづ らい仕組みを構築する事が可能 –
基幹システムなど堅牢なシステムに用いられる事が多い • MSSQL(SQL Server) – .NetなどのMicrosoft製品との親和性が非常に高い – Visual Studioを用いれば、実行計画を即座に可視化する 事も可能 – 謎のデッドロックが起きる事が多いとの噂あり
RDBMS • MySQL – OSS DB シェアNo1 – レプリケーションを用いる事で冗長化構成を取る 事が可能 • Firebird
– OSS DB シェアNo2 • Postgresql – OSS DBの中で、マルチバイト対応が一番早かっ たRDBMSであったため、日本国内ではシェアが 高い
Master DB • /etc/drbd.conf • /etc/ha.d/ha.cf lvs103 Master Active lvs104
Master Standby DRDB : データ同期 heartbeat : 仮想IP制御
Slave DB • show slave status; • show databases; (必要なくても全DBを収容する設計)
lvs103 Master Active lvs104 Master Standby lvs112 Slave API lvs113 Slave j-sen lvs114 Slave j-sen lvs115 Slave haken lvs116 Slave cron replication
Connect to Slave DB • /etc/keepalived/conf.d/db.conf lvs101 Load Balancer lvs102
Load Balancer Application Server lvs113 Slave j-sen lvs114 Slave haken Load Balance Direct Routing
Master DB Load balance • ジョブセンス系 – lvs103, lvs104 – 負荷が低く売上が高い媒体が収容される •
ジョブストック系 – lvs105, lvs106 – 負荷が高く売上が低い媒体が収容される • 負荷が高くなれば3台目のMaster Databaseを 構築する事によってスケールアウト実施 • show databases; (lvs53, lvs54)
Master DB Load balance • 1媒体1データベースでも負荷に耐えられなく なったら・・・ • 垂直分割 – テーブル毎に収容される筐体を変更
– 例 : image tableはDB1に収容 – 例 : image tableはDB2に収容 • 水平分割 – 同じテーブルを複数の筺体に分散させる – 例 : 会員番号1000番まではDB1に収容 – 例 : 会員番号2000番まではDB2に収容
Connect to Slave DB • ちなみに・・・
Connect to Slave DB • Job sense派遣はSlave Databaseが1台だけ であるのにも関わらず、わざわざLoad Balancerを経由
– 障害時にLoad Balancerの設定変更のみで復旧 可能 – 急激な負荷上昇時にLoad Balancer設定変更の みでスケールアウトが可能
一見、意味不明な設定でも 理由があってやってます 今後は理由を可視化するよう 頑張ります
次回は・・・ • インフラ屋さんの仕事は今回で最終回にする かもしれません(Task Force側で発表の機会 を下さい) • 次回以降は趣味に走るかも・・・ – vyatta – livesenseネットワーク
大改修計画