思路:
1、完整閱讀分庫、分表政策,注意區分分庫與分表的不同,撰寫閱讀筆記。
2、試驗基于ibatis+spring2.0的分庫源碼,注意思考路由的規則。
3、試驗分表的源碼實作,一般采用ibatis2.0以後的動态表名實作。
以長春市教育公共服務平台管理軟體為例,在master庫中設定一張表,記錄每個學校所在的資料庫,比如db0,db1,...dbn
當使用者進行登入時,通過loginperson表查找到此人的學校id,根據上面的表得知此人所在學校對應的資料庫為db?,通過ibatis的路由到此資料庫執行個體進行資料讀寫。這樣,友善以後因為資料量大造成資料庫擴充而帶來的資料遷移問題。
參考閱讀:
memcache記憶體配置設定政策
http://www.woxihuan.com/53055876/1329751905085867.shtml
大資料量的存儲,以及分表常見算法及其帶來的問題,和微薄url的加密規則猜想
keepalived+nginx
http://wenku.baidu.com/view/698f3f000740be1e650e9a95.html
memcached 叢集單點故障解決方案
http://apps.hi.baidu.com/share/detail/20218657
基于 spring 和 ibatis 的動态可更新多資料源持久層
使用spring解決ibatis多資料源的苦惱
http://developer.51cto.com/art/200908/144000.htm
ibatis和hibernate 資料庫分表(動态表名映射)的實作方法
應用memcached儲存session會話資訊
http://rdc.taobao.com/team/jm/archives/590
spring + ibatis 的多庫橫向切分簡易解決思路
http://www.iteye.com/topic/781317
************************************************************************
分庫分表的解決方案
http://fengbin2005.iteye.com/blog/1165038
了解緩存
hibernate memcached能緩存什麼,是所有對象嗎
http://wenda.tianya.cn/wenda/thread?tid=020815ee6758b3dd
memcached分布測試報告(一緻性哈希情況下的散列函數選擇)
memcached server lru 深入分析
http://www.iteye.com/topic/225692
sql server分區表方案
http://terryli.blog.51cto.com/704315/163315