ElastiCache For Redis Cluster creation and use

Redis as a cache database, in the Internet industry, highly respected. Many of its unique advantages, can solve many business structure cache requirements.

For Redis products, AWS launched for the PAAS service Elasticache for Redis. Today, we briefly explain how to create Elasticache for Redis Cluster.

And test redis in the process of re-sliced, about how much time is consumed.

 

About ElastiCache Scaling Links

https://docs.aws.amazon.com/zh_cn/AmazonElastiCache/latest/red-ug/redis-cluster-resharding-online.html

 

1. The cluster has a unified Endpoint , to provide client access

 1.png

2. Creating a 3 Ge Sharding , the latter is fragmented, there is specific on which node, there is a total of 16384 Ge hash slot .

 2.png

3. 点击进入一个 sharding,就可以看到,下面有三个节点,一组两从,但是现在页面,没有显示哪个是主的,那个是从的。我们也可以通过下面的endpoint进行访问,但是如果出现机器宕机,或者需要访问的slot不在这个sharding,就会访问失败。所以,一定要用总的redis endpoint进行访问。

 3.png

4. 增加sharding 实例

 4.png

5. 实际完成耗时13分钟(这是一个空的redis cluster,如果是生产环境,数据越多,sharding越慢)

 5.png

6. 删除shard操作

 6.png

7. 删除操作10分钟,未完成

 7.png

8.删除操作完成,总耗时17分钟

 8.png

 

Summary, Redis as a cache database, the general scene, memory consumption, the amount of cached data is not very large. Or that the cached data is relatively stable. In add shards and delete shards process, have a long modifying time, this period of time, for redis impact of this cache database performance, can not be ignored, so the operation of the proposed expansion and contraction, to be in business It performs an idle period.


Guess you like

Origin blog.51cto.com/hsbxxl/2414023