Best way to setup HA RabbitMQ and Redis ReJson on VM vs Kubernetes

1/22/2020

We have a requirement to setup Elasticsearch, RabbitMQ, and Redis ReJson on AWS with HA multi-AZ configuration.

However, for Elasticsearch we will be using AWS managed service Elasticsearch but for RabbiMQ & Redis ReJson what will be better option to set it up on VM or with K8s.

We can not use manage service for Redis as AWS Memcache no support for ReJson module while Redislab only supporting it in PRO subscription which is around 2$/per Hour.

With K8s we are thinking to use helm chart to setup Redis and RabbitMQ so that it will be HA and whole Kubernetes cluster will be multi-AZ.

With VM it will be a manual process to set up on all nodes in different AZ or will use Ansible (no playbook available).

Please help us and suggest Pros & Cons for both and which one will be easy to set up and provide better performance.

-- Harsh Manvar
amazon-web-services
docker
kubernetes
rabbitmq
redis

1 Answer

1/23/2020

If you don't need of some specific feature from RabbitMQ, I encourage you to take a look in SQS as an alternative.

SQS support FIFO and is HIPPA compliance, you don't need to take care in scale the resources and maintenance servers.

About Redis, if you can't use Elasticache you could try with K8s using Sentinel for HA, see this HELM chart. The classic redis-cluster command is not recommended as you see here.

If you decided to run Redis in classic ec2 instances you must have a dns configured for each ec2 instance in your redis cluster, because if you need to replace any them you could just change the dns with the new instance ip and your cluster will still working. If you use IP to setup the cluster you can't do that since static ip is not a good approach in cloud.

Use a cloud managed services means you don't need to take care of server maintenance, scale and backup in the other hand there are costs involved.

Finally, I think the "Best practices" is based in what your application needs, only you know how it works and the best approach to keep it up & running.

I hope it helps!

-- KoopaKiller
Source: StackOverflow