這個技術演講 - Real-life Riak at Mobile Interactive Group 是在 Skills Matter 站上看的 html
Mobile Interactive Group uses Riak extensively across many of their platforms including their SMS gateway and Facebook/iPhone voting platform. David Dawson gives the DeNormalised NOSQL Meetup a high level overview on how they have deployed Riak and some of the problems they faced (including the solutions). redis
分享了三點心得: bash
- 在他們的 wallet 實現中,單獨使用 Riak 在一個 KV 中存放 balance 和 transaction history 時:隨着使用量的增長,性能開始降低;因爲 Riak 是 Eventual Consistency,分支狀態有爆炸的風險,並且有超支的可能。改進方案是引入 Redis,balance 存 Redis,每一個 transaction 存一個 Riak KV(Polyglot Persistence)。Riak 是 System of Truth,按期檢查並保持 Riak 和 Redis 中的數據一致性。災難恢復時基於 Riak 重建 Redis 中的 balance。
- 他們在生產環境中不定時出現 app server 到 Riak 的訪問延遲,特別時負載上來的時候,延遲最長的時候能達到 60 秒。他們構建了一個測試環境來定位問題,磁盤換成 SSD 後肯定不是 Disk I/O 致使的,用機器上的第二個網口單獨構建一個 Riak 專用的 VLAN 後肯定不是 Network I/O 致使的。因爲他們以前是把 app server 和 Riak 同時運行在一個物理硬件上的,分離這兩個角色後就沒有延遲出現了。進一步的研究肯定是緣由是內存訪問的競爭,使用 NUMACTL 對內存訪問調優後作到在同一個物理硬件上同時運行 app server 和 Riak 相互也不打架。(關於 NUMA 概念的詳細解釋找到好文一枚)
- 基於 Riak 構建了一個可靠的 queue。
順便吐槽:這個 Skills Matter 站的界面實在是夠挫的,難道說是有意爲之? app
做者:czhang 性能
原文連接:http://czhang.writings.io/articles/6-real-life-riak-at-mig-watched-20130519 測試