使用自动缩放将节点添加到现有的Aerospike集群 [英] add node to existing aerospike cluster using autoscale

查看:168
本文介绍了使用自动缩放将节点添加到现有的Aerospike集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在AWS自动缩放下添加Aerospike集群吗?喜欢 .我的初始自动伸缩组大小将为3,如果有更多流量进入,并且如果CPU利用率大于80%,则它将在集群中添加另一个实例.您认为有可能吗?会不会有缺点或会在群集中造成任何问题?

can i add aerospike cluster under aws autoscale? Like . my initial autoscale group size will 3, if more traffic comes in and if cpu utilization is greater then 80% then it will add another instance into the cluster. do you think it is possible? and does it has any disadvantage or will create any problem in cluster?

推荐答案

aerospike/下有一个Amazon CloudFormation脚本. aws-cloudformation 给出了如何启动此类集群的示例.

There's an Amazon CloudFormation script at aerospike/aws-cloudformation that gives an example of how to launch such a cluster.

但是,自动扩展的重点是增加无共享工作节点,例如webapps.这些节点通常没有任何共享数据,您只需启动一个新节点即可使用.

However, the point of autoscale is to grow shared-nothing worker nodes, such as webapps. These nodes typically don't have any shared data on them, you simply launch a new one and it's ready to work.

将节点添加到像Aerospike这样的分布式数据库的目的是要具有更多的数据容量,并使更多节点上的数据均匀,这使您能够增强处理操作(读取,写入等)的能力.自动缩放Aerospike可能无法按您期望的那样工作.这是由于以下事实:将节点添加到群集时,会创建一个新的(较大的)群集形成,并且数据自动平衡.平衡的一部分是在节点之间迁移数据的分区,它在以下时间结束每个节点上的分区数再次相等(因此,数据均匀分布在集群的所有节点上).迁移工作繁重,占用了网络带宽.

The point of adding a node to a distributed database like Aerospike is to have more data capacity, and to even out the data across more nodes, which gives you an increased ability to handle operations (reads, writes, etc). Autoscaling Aerospike would probably not work as you expect it. This is because of the fact that when a node is added to the cluster a new (larger) cluster is formed, and the data is automatically balanced. Part of balancing is migrating partitions of data between nodes, and it ends when the number of partitions across each node is even once again (and therefore the data is evenly spread across all the nodes of the cluster). Migrations are heavy, taking up network bandwidth.

如果您可以将其安排在流量峰值之前发生,那么此将会起作用,因为这样可以提前完成迁移,并且群集将为下一个峰值做好准备.您不希望在出现峰值流量时进行此操作,因为这只会使情况变得更糟.您还想确保当群集收缩时有足够的数据空间,为主索引提供足够的DRAM,因为两者的每节点使用量都将增加.

This would work if you could time it to happen ahead of the traffic peaking, because then migrations could be completed ahead of time, and your cluster would be ready for the next peak. You would not want to do this as peak traffic is occuring, because it would only make things worse. You also want to make sure that when the cluster contracts there is enough room for the data, enough DRAM for the primary-index, as the per-node usage of both will grow.

在Aerospike中具有额外功能的另一点是允许滚动升级 a>,一个节点一次升级,而无需拆除整个集群. Aerospike通常用于不需要停机的实时应用.您的集群至少需要能够处理发生故障的节点并具有足够的容量来弥补松弛.

One more point of having extra capacity in Aerospike is to allow for rolling upgrades, where one node goes through upgrade at a time without needing to take down the entire cluster. Aerospike is typically used for realtime applications that require no downtime. At a minimum your cluster needs to be able to handle a node going down and have enough capacity to pick up the slack.

请注意,您可以轻松使用配置控件迁移的速度,但如果您降低迁移过程的积极性,迁移时间会更长.

Just as a note, you have fine grain configuration control over the rate in which migrations happen, but they run longer if you make the process less aggressive.

这篇关于使用自动缩放将节点添加到现有的Aerospike集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆