shared nothing架構

Shared nothing architecture簡介

分類: Architecture   1545人閱讀  評論(0)  收藏  舉報
1. 概念
什麼是Shared nothing architecture?
wiki:「A  shared nothing architecture (SN) is a  distributed computing architecture in which each node is independent and self-sufficient, and there is no single point of contention across the system. More specifically, none of the nodes share memory or disk storage」
簡單的說:
shared nothing architecture是一 種分佈式計算架構,這種架構中不存在集中存儲的狀態,整個系統中沒有資源競爭,這種架構具備很是強的擴張性,在web應用中普遍使用。

2. 對比
Shared-nothing、shared-memory、shared-disk是並行系統最常使用的模式。
shared-memory:多個cpu共享同一片內存,cpu之間經過內部通信機制進行通信
shared-disk:每個cpu使用本身的私有內存區域,經過內部通信機制直接訪問全部磁盤系統。
和shared-memory、shared-disk相比,shared-nothing優點明顯,在針對多用戶並行訪問的時候,經過橫向擴充資源,可以減小response time。


3. 分片
shared noting須要確立一種分片策略,使得依據不一樣的分片策略,減小資源競爭。
三種基本的分片策略結構:
1) 功能分片
根據多個功能互相不重疊的特色進行分片,這種方式在ebay取得巨大成功。缺點是須要深刻理解應用領域,才能更好地分片。
2) 鍵值分片
在數據中找到一個能夠均勻分佈到各個分片中的鍵值。
3) 查表
在集羣中有一個節點充當目錄角色,用於查詢哪一個節點擁有用戶要訪問的數據。缺點在於這個表可能成爲整個系統的瓶頸及單點失效點。

4. 現狀
shared-nothing architecture目前普遍存在,Map-reduce、BigTable、Cassandra、MongoDB等等。

5. 擴展閱讀
Paper:The Case for Shared Nothing
http://oracle.chinaitlab.com/optimize/39626.htmlhtml

相關文章
相關標籤/搜索