Scalr和mysql in cloud的自动扩展

http://scalr.net/


知道这个工具是因为在《high performance mysql》中mysql on cloud提到了这个工具:

The cloud isn’t inherently scalable just because it’s a cloud, and choosing a scalable platform doesn’t automatically make your application scalable.

The other siren call of the cloud is the dream of auto-scaling—that is, spinning up more instances in response to increased demand, and shutting them down again when demand reduces. Although this is feasible with stateless parts of the stack such as web servers, it’s very hard to do with the database server, because it is stateful. For special cases, such as read-mostly applications, you can get a limited form of auto-scaling by adding replicas,1 but this is not a one-size-fits-all solution. In practice, although many applications use auto-scaling in the web tier, MySQL isn’t natively capable of running across a shared-nothing cluster of servers that all assume peer roles. You could do it with a sharded architecture that automatically reshards and grows or shrinks, but MySQL itself just isn’t able to auto-scale.

其中在1处有一个注解:

“A popular open source service for auto-scaling MySQL replication in the cloud isScalr

正如文中住处的,mysql本身并不能自动扩展,即使被部署到了云上也不行。

Scalr所实现的数据库自动扩展分为两个方面:

1,当原数据库读操作过多时,sclar自动在云上创建另外的数据库实例,这些新建出来的实例称为slave。同时将数据复制到所有的slave上,然后将读操作分布到复制出来的各个数据库上。原数据库称为master。只有master数据库接受写操作,同时写操作会被同步到所有slave机器上。

2,当原数据库有很多写操作并快过载时,sclar自动创建一个更大的(或性能更优的数据库实例),然后用新的实例替代原实例。


正如书中所说,For special cases, such as read-mostly applications, you can get a limited form of auto-scaling by adding replicas。

最后关于mysql在云上的扩展,书中说:在云上扩展mysql的方式,和不在云上扩展mysql的方式并没有多大不同。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值