Generator-jhipster: Redis Cluster support

Created on 16 Jan 2020  路  8Comments  路  Source: jhipster/generator-jhipster

Overview of the feature request

Our current implementation of Redis is for single server. In real production, it will never be the case, it will be with a Redis Cluster.

Motivation for or Use Case

A single server of Redis will be never used in prod.

See https://github.com/jhipster/generator-jhipster/blob/master/generators/server/templates/src/main/java/package/config/CacheConfiguration.java.ejs#L729

See https://github.com/redisson/redisson/wiki/2.-Configuration#24-cluster-mode

The goal would be to have:

  • a docker compose file to start a Redis cluster in dev
  • the correct config in yaml
  • the integration tests, which could still be with single server I think

Then, for all deployment (docker compose, k8s etc) use a Redis Cluster

Related issues or PR

https://github.com/jhipster/generator-jhipster/pull/10057
https://github.com/jhipster/generator-jhipster/issues/9280

  • [x] Checking this box is mandatory (this is just to show you read everything)
$$ bug-bounty $$ $100 area redis

Most helpful comment

I'm starting to work on the dev part.

All 8 comments

cc @Shaolans @juliensadaoui @avdev4j

I'm adding a bounty on this, as I know some of us will need this soon.
The bounty can be splitted in 2 part, 1 for dev/java, the other for the DevOps and deployment part

I'm starting to work on the dev part.

About the Ops part, in fact, nothing is done today: Kubernetes, Openshift, AWS, etc...
It's only done with Docker-Compose.

So I'm reducing the bounty to 100$ to be fair -> if someone want to work on the Ops part, let me know and let's open a new ticket for that

I'm closing this as both PR have been merged.
I'll update the documentation about this

Does this feature works with AWS Elasticache Redis (with cluster mode enabled) like stated here https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Endpoints.html#Endpoints.Find.RedisCluster ?

Look at the specific code here:
https://github.com/jhipster/generator-jhipster/blob/main/generators/server/templates/src/main/java/package/config/CacheConfiguration.java.ejs#L746-L756

For me, the last time I tried the cluster mode:

  • it works locally
  • it works for one of my customer project, with Redis deployed with Kubernetes

I don't see any reason why it won't work for AWS Elasticache Redis. I would say: try :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trajakovic picture trajakovic  路  4Comments

ahmedeldeeb25 picture ahmedeldeeb25  路  3Comments

edvjacek picture edvjacek  路  3Comments

SudharakaP picture SudharakaP  路  3Comments

pascalgrimaud picture pascalgrimaud  路  4Comments