DB Cluster / Replication in Active Record

突然看到了 這篇文章,差點沒興奮的大叫出來!!!


I have done some extensive work on active record to allow for databases to be defined in terms of "connection pools" rather than simply one database. Most of the work was completed in connection_specification.rb and is done at this level to be compatible with any backend you choose. Also this patch maintains full compatibiltity with the current paradigm so no changes are necessary to current applications/documentation.

這是一個讓 Active Record 支援 Connection Pool 的技術,使用者可以在 config 裡面這樣寫

development_read_pool: db1, db2, db3
development_write_pool: db4, db5, db6

而這樣使用者就可以使用不同的 read write connection pool了。使用方式跟操作方式,我想等到我已經確定要怎麼玩了再講吧,Anyway,this is a very good starting point。

參考連結
  1. RFourm:Support for DB Clusters/Replication in ActiveRecord
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值