jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

Redis Cluster support #11129

Closed pascalgrimaud closed 4 years ago

pascalgrimaud commented 4 years ago
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:

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

pascalgrimaud commented 4 years ago

cc @Shaolans @juliensadaoui @avdev4j

pascalgrimaud commented 4 years ago

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

pascalgrimaud commented 4 years ago

I'm starting to work on the dev part.

pascalgrimaud commented 4 years ago

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

pascalgrimaud commented 4 years ago

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

pascalgrimaud commented 4 years ago

Bounty claimed: https://opencollective.com/generator-jhipster/expenses/13928

vrijmetse commented 3 years ago

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 ?

pascalgrimaud commented 3 years ago

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:

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