0

When I was working with Redisson in Java, I got a performance issue which I need more advises. Here is the situation:

Need Redis cache to store value(Object) with primary key & secondary key, so I figured that I could use RMapCache in Redisson.

It's easy to achieve the result but seems there's a performance issue with this distributed map, which will add many round trips and will create performance bottleneck under high concurrency. And the explanation here: https://www.slideshare.net/RedisLabs/redisconf17-distributed-java-map-structures-and-services-with-redisson

Well, I was considering RLocalCachedMap, but seems it doesn't the correct approach either. Could someone please help me with this?

How to improve performance if I want to use Redis cache with primary key & secondary key to store value(Object)? Any suggestions would be helpful. Thanks in advance.

user8460034
  • 31
  • 1
  • 4
  • 1
    1 - Analyze your map before publishing it! This may be obvious, but I've often been too quick to publish to the server without checking the results from analyzing. Just go to File->Analyze Map and do a quick check to see if your map has any issues. The faster your map can render, the faster it can cache. 2 - Keep the data local If you have a single machine deployment, keep the map data in a FGDB local to the server. If you have multiple machines, let each machine have a copy of the data and use the option when setting up the cache. – Fady Saad Aug 14 '17 at 03:27
  • @FadySaad Thanks for helping. Could you give more specific details about this in Java, like using RLocalCachedMap instead of RMapCache? – user8460034 Aug 14 '17 at 05:39

1 Answers1

2

While RLocalCachedMap can improves the read operation performance upto 45x by caching the values locally in the JVM, write operations are always sent to redis as would with other types of RMaps.

If you are suffering with its write performance, it is recommended to check out the PRO edition which gives upto 4x higher throughput than the Open Source edition.

Redisson_RuiGu
  • 1,012
  • 10
  • 13