Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Client-side caching] About the Implementation of CSC #4013

Open
wp973 opened this issue Nov 8, 2024 · 5 comments
Open

[Client-side caching] About the Implementation of CSC #4013

wp973 opened this issue Nov 8, 2024 · 5 comments

Comments

@wp973
Copy link

wp973 commented Nov 8, 2024

Hi, I would like to ask a question about the implementation of CSC.

Why choose the default mode to implement CSC? Redis documentation describes that the default mode costs some memory on the server side.

  private void initializeClientSideCache() {
    sendCommand(Protocol.Command.CLIENT, "TRACKING", "ON");
    String reply = getStatusCodeReply();
    if (!"OK".equals(reply)) {
      throw new JedisException("Could not enable client tracking. Reply: " + reply);
    }
  }

Thanks~

https://redis.io/docs/latest/develop/reference/client-side-caching/#the-redis-implementation-of-client-side-caching

Redis / Jedis Configuration

Jedis version: 5.2.0 GA

Redis version: > 6.0

Java version: 21

@sazzad16
Copy link
Collaborator

sazzad16 commented Nov 8, 2024

We would have to start from somewhere. Right?
It would never be shipped if we were trying to support all the configuration parameters in our first CSC support release.

We welcome PRs to support different CSC configuration parameters.

@wp973
Copy link
Author

wp973 commented Nov 11, 2024

@sazzad16 Thanks for your reply!

When we use the default mode, maybe we should limit the maximum number of tracking keys to avoid consuming too much server-side memory?

As described in redis.conf:

image

@sazzad16
Copy link
Collaborator

When we use the default mode, maybe we should limit the maximum number of tracking keys to avoid consuming too much server-side memory?

Yes, this is a good idea to follow for the users and maintain at the server side.

@wp973
Copy link
Author

wp973 commented Dec 12, 2024

hi @sazzad16 , we are doing POC functional verification of CSC(using Jedis). We found that the server-side push of invalidation messages consumes a lot of CPU resources on the server side.

Related issues have been submitted to the redis repository redis/redis#13681.

Please help pay attention to this issue. Thanks!

@wp973
Copy link
Author

wp973 commented Dec 12, 2024

In the POC, we also encountered the problem of increasing server memory caused by tracking.

tracking mode: default

image

Related issues: redis/redis#9231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants