Home > MySQL Proxy

MySQL Proxy

  • April 18, 2008 1:59 PM

MySQL Proxy

C-based

Luaは、会場のみんなはほとんど使っていなかった。

ラウンドロビンでスレーブへ
スクリプトは得に書く必要なし
luaでカスタマイズ可能
lib/proxy/balance.lua

スレーブをかなり意識した作りになっている。
現在はアルファ

レプリケーションログをトラックする
IO, SQLスレッドを監視
かなり遅れている(設定した時間以上)スレーブは、無視したり。
MySQL Enterprise Monitorと統合

a passive connection poolを維持
client closes connection
proxy adds connection to the pool
less connection overhear
examples/tutorial-keepalive.lua

MySQL Connection Manager
Enterprise Product


更新はマスターへ、参照はスレーブへ振り分け
ただし、stateless SQLが必要
lib/rw-splitting.lua

read write splitting
auto_increment
insert
select last insert id
sql_calc_found_rows
temporary tables
session variables
show slave status
なども、luaスクリプトで制御

sharding
レンジで、またはlookup tableで分散させる、ってdatabase partitioningのことか?
Replication Threadからは独立
read scale out hot spot safe
hot spots in writing need reorg
hscale 0.1

select ... where user_id=176
select /* shard=1 */ ...
こんな感じで、更新も分散させるのかな?

SELECTは全てのshardで実行
UNIONs result-set internally
Aggregation aware, MAX(), SUM(), MIN(), AVG()


MySQL Query AnalyzerがEnterprise Monitor内に追加される。(later this year)

new in 0.7.0ってことは、1.0はまだだね。

----------

関連エントリー

Home > MySQL Proxy

Search
Feeds

Return to page top