Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redis Cluster in multiple threads

Im currently using Redis Cluster Mode with 3 master instances, i'm using Jedis(Java client) in listening server which every data received i create a new thread then the thread make an update in redis.

My question is how can i use Redis Cluster instance in multiple thread with pool configuration.

like image 436
salah eddine Avatar asked Dec 24 '22 19:12

salah eddine


1 Answers

JedisCluster is thread-safe. It contains JedisPool for each node internally, so you don't need to worry about dealing JedisCluster instance with multithread.

like image 145
Jungtaek Lim Avatar answered Jan 14 '23 03:01

Jungtaek Lim