Page MenuHomePhabricator

Introduce PCS cache management layer
Closed, ResolvedPublic

Description

Background Information

In order to remove PCS from restbase, PCS needs to manage its own cache.

What this is not about

This is not about pre-generation, this will be covered in a separate task

What

The cache layer should connect to the same Cassandra cluster used by restbase

Open Questions

What's the work needed in the infrastructure side?

Acceptance Criteria

  • A strategy exists to migrate within capacity constraints
  • PCS is able to manage its own cache layer and restbase cache can be turned off

Event Timeline

MSantos triaged this task as High priority.Oct 16 2023, 2:43 PM

Initial patch here after bootstrapping the nodejs env and gitlab CI:
https://gitlab.wikimedia.org/repos/content-transform/nodejs-cassandra-storage/-/merge_requests/1

@Eevans will you be available to take a look at this patch, mostly for the cassandra specific changes?

Initial patch here after bootstrapping the nodejs env and gitlab CI:
https://gitlab.wikimedia.org/repos/content-transform/nodejs-cassandra-storage/-/merge_requests/1

@Eevans will you be available to take a look at this patch, mostly for the cassandra specific changes?

I left comments on the merge-request (TL;DR LGTM)

I added an item to the acceptance criteria about having a strategy for migration that works within the capacity constraints of the cluster. Hopefully this is the right issue for this, let me know if that's not the case and I can move it elsewhere (including to a separate ticket).

I'm going to be taking a closer look at utilization, as I have some reason to think it might be artificially high, but it's really doubtful that we'll have a enough to store all of PCS's cache twice (once for the old system, and once for the new), and maintain a responsible amount of overhead. I don't know if that means that we migrate by group (wikipedia, enwiki, etc), or by table (mobile_html, page_summary, etc), or via some combination of both (or whether or not either would be prohibitively difficult). Or perhaps there are other RESTBase use-cases that are near enough to be removed that this won't be an issue?

{F41439373}

@Eevans i cant see the file you attached in your comment. If there is a concern for storage we can always switchover gradually by project.

@Eevans i cant see the file you attached in your comment.

That's strange, it's an image of storage utilization on the cluster. I can see it inline, and click to view it full page. I wonder what happens if I attach the same image again?

image.png (842×1 px, 201 KB)

If there is a concern for storage we can always switchover gradually by project.

By project would work.

Works, thanks! The previous file showed up as "restricted file".

Change 985166 had a related patch set uploaded (by Jgiannelos; author: Jgiannelos):

[mediawiki/services/mobileapps@master] Introduce server side caching

https://gerrit.wikimedia.org/r/985166

Change 985166 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Introduce server side caching

https://gerrit.wikimedia.org/r/985166