Page MenuHomePhabricator

Deploy instance of hoarde as linked-artifacts(?) in k8s
Closed, ResolvedPublic

Description

Data-Persistence is working on an MVP of a shared service for the persistent caching of outputs which correspond to MediaWiki page content (aka linked artifacts). See the (work-in-progress) proposal for more information. The first use-case of this shared service is T402984: Data Persistence Design Review: Article topic model caching. The rollout plan (copy-and-paste from the proposal document):

Normally a proposal like this is discussed at length with stakeholders and subject matter experts. The process results in feedback, feedback in changes, and consensus is developed. Proposals that move forward are resourced, and planned for accordingly. For this proposal, we would like to fast track an MVP deployment to production, and to do so as the broader discussion unfolds.

This proposal came too late to accommodate tone checking, leaving any eventual migration of it (or other legacy systems) as an article of unresolved debt. There exists however a moment of opportunity for article topics, provided we don’t unnecessarily block the team’s work. Doing this carries some risk that the ensuing discussion will result in changes that require double-handling or rework. At the extreme end of this, discussion could lead to consensus that we should not do this at all, in any form. In that case, what we do here risks becoming a bespoke one-off for article topics —a dead-end— but that is precisely what happens if we do nothing. Provided that we do not proceed with any additional use-cases until the discussion concludes, and consensus is reached, these risks seem manageable.

TL;DR We’re trying to get a foot in the metaphorical door before another bespoke implementation adds to our mounting support costs, while putting in place guardrails to minimize risk, and ensure a full review and discussion.

The software is called Hoarde, and its source repo is: https://gitlab.wikimedia.org/repos/sre/hoarde.

Ideally we'd keep the software & service names disjoint, as we did for Kask (software), and sessionstore and echostore (services). Possible ideas for the service name are: linked-artifacts, linked-cache, linked-artifact-cache, artifact-cache, etc; Bikeshedding of service names welcome!

Edit: Updated title to reflect the state-of-the-art for this discussion.

The service endpoint will need to be accessible from within the production network, and should presumably use the service mesh (it will be accessed from MW extensions). It will need to connect to Cassandra (the RESTBase cluster) for storage, and to make connections to configured "lambdas" (services running in k8s, including MLs k8s cluster).


See also: T402984: Data Persistence Design Review: Article topic model caching

Details

Related Changes in Gerrit:
SubjectAuthorRepoBranchLines +/-
Eevansoperations/deployment-chartsmaster+4 -1
Eevansoperations/deployment-chartsmaster+5 -0
Eevansoperations/deployment-chartsmaster+1 -1
Eevansoperations/deployment-chartsmaster+6 -0
Eevansoperations/puppetproduction+13 -0
Eevansoperations/deployment-chartsmaster+10 -0
Eevansoperations/deployment-chartsmaster+1 -1
Eevansoperations/deployment-chartsmaster+1 -1
Eevansoperations/deployment-chartsmaster+274 -0
Eevansoperations/deployment-chartsmaster+16 -10
Eevansoperations/deployment-chartsmaster+143 -6
Eevansoperations/deployment-chartsmaster+2 K -0
Eevansoperations/deployment-chartsmaster+309 -3
Eevansoperations/deployment-chartsmaster+2 K -0
Federico Cerattooperations/puppetproduction+21 -0
Eevansoperations/deployment-chartsmaster+2 K -0
Eevansoperations/deployment-chartsmaster+327 -3
Eevansoperations/deployment-chartsmaster+2 K -0
Eevansoperations/dnsmaster+3 -0
Eevansoperations/deployment-chartsmaster+1 -0
Jeltooperations/puppetproduction+4 -0
Eevansoperations/deployment-chartsmaster+2 K -0
Show related patches Customize query in gerrit
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
add repos/sre/hoarde to trusted runnersrepos/releng/gitlab-trusted-runner!142jeltoadd_hoardemain
Customize query in GitLab

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Eevans triaged this task as Medium priority.Jan 8 2026, 4:55 PM
Eevans updated the task description. (Show Details)
Eevans added a subscriber: BWojtowicz-WMF.

Change #1224817 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] WIP hoard chart

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

Bikeshedding of service names welcome!

:)

Do you prefer Artifact over Entity? Entity seems like a more common term for this concept to me, whatcha think? In DPE at least, artifacts usually mean something more like a static file

Also, why 'linked'? I'd guess maybe because a record stored in the cache is 'linked' by a stable foreign key to the source system? I worry that 'linked' may be a overloaded term here, especially if we ever store page links ;) What did you intend 'linked' to mean?

entity-cache maybe?

[ ... ]
Do you prefer Artifact over Entity? Entity seems like a more common term for this concept to me, whatcha think?

Both are a little too generic for my taste, but I think the entity here is the MediaWiki article. It is a particular and discrete unit that can be considered apart from its properties...

image.png (732×317 px, 33 KB)

What is being stored here is more ...object produced or shaped by craft, especially a tool...or ornament of archaeological or historical interest, or something viewed as a product...rather than an inherent element. So artifacts associated with entities.

image.png (732×373 px, 51 KB)

In DPE at least, artifacts usually mean something more like a static file

I don't think that's too far off. For example, from the perspective of this system, the data is opaque (as it is for a system storing files), even if it's somehow structured according to the thing that produced it.

Also, why 'linked'? I'd guess maybe because a record stored in the cache is 'linked' by a stable foreign key to the source system? I worry that 'linked' may be a overloaded term here, especially if we ever store page links ;) What did you intend 'linked' to mean?

Yes, linked as in "connected". Each is linked to a particular revision of a MediaWiki article.

I think as important as having the capability itself, is having a system (and it's corresponding documentation, nomenclature, etc) that encapsulates a well-defined problem. We should be able to clearly and easily define exactly what this is for (and perhaps even more importantly, what it isn't for).

entity-cache maybe?

This feels less specific, where I would prefer something more specific. The less ambiguous the better!

Oh, entity vs artifact interesting. Indeed! We would not be storing the entity, but data directly associated with / about the entity. A MW example: pagelinks is derived data, but we would not say that a pagelink is a core MW entity. It is derived data about a MW entity: the page. Is it a new derived entity? Meh, I suppose you could call it that, but that is not helpful. Okay I'm convinced entity is not a good name for this then.

Another term for what this is sort of doing: materialized view storage. Or, it can be used as a materialized view, but it also has cache like abilities: fetching the requested value on cache miss. materialized-artifacts? Meh.

Yes, linked as in "connected".

Hm, what about using the term 'foreign' as in foreign key somehow. foreign-artifacts? Too weird? :) associated-artifacts ?

Maybe linked-artifacts is just fine :D

[ ... ]

Hm, what about using the term 'foreign' as in foreign key somehow. foreign-artifacts? Too weird? :) associated-artifacts ?

Maybe linked-artifacts is just fine :D

I'm not a huge fan of linked-artifacts, but I've vacillated on this quite a bit, with a trajectory that looked a lot like the above. :)

Change #1227851 had a related patch set uploaded (by Federico Ceratto; author: Federico Ceratto):

[operations/puppet@production] service, trafficserver: Prepare "linked-artifacts" k8s pod

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

Eevans renamed this task from Deploy instance of hoarde as artifact-cache(?) in k8s to Deploy instance of hoarde as linked-artifacts(?) in k8s.Jan 16 2026, 6:44 PM
Eevans updated the task description. (Show Details)

We (Serviceops) are at capacity this quarter, but we'll keep an eye on this, please tag us if we can help with design questions or issues during deployment.

Change #1237258 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] deployment_server: add linked-artifacts kubeconfig files

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

Sorry for getting back late @Eevans. We where trying to fill in some missing pieces regarding the use and user of this service as well as the rollout plan and we should probably have reported back here earlier. Could you please add or link these to the task description?

Sorry for getting back late @Eevans. We where trying to fill in some missing pieces regarding the use and user of this service as well as the rollout plan and we should probably have reported back here earlier. Could you please add or link these to the task description?

I updated the task description; Thanks!

Change #1237258 merged by Eevans:

[operations/puppet@production] deployment_server: add linked-artifacts kubeconfig files

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

Change #1243850 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] admin_ng: add namespace for linked-artifacts

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

Change #1243850 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] admin_ng: add namespace for linked-artifacts

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

This has been deployed with other admin_ng changes

Change #1243850 merged by jenkins-bot:

[operations/deployment-charts@master] admin_ng: add namespace for linked-artifacts

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

I was misled by the namespace changes caused by the puppet patch, the namespace definition itself wasn't merged. I just merged and deployed it this morning.

Change #1247172 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/dns@master] wmnet: add linked-artifacts CNAME record for k8s ingress

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

Change #1247175 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/puppet@production] service: add linked-artifact service (k8s ingress)

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

Change #1248148 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] services: add linked-artifacts service

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

Change #1247172 merged by Eevans:

[operations/dns@master] wmnet: add linked-artifacts CNAME record for k8s ingress

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

Hii all! Wanted to bring up a discussion that came up while working on the Article Topics integration with Hoarde. It's about the lambda interface protocol and whether gRPC should be the only supported method or whether we should consider HTTP. I've been discussing this with both Eric and Luca, and I think there are valid points on both sides so I wanted to open it up here.

There is a very compelling case for gRPC - it gives us structured contracts, backward-compatible schema evolution, and built-in handling of timeouts and failure propagation. This is also based on previous experience with RESTBase, where using plain HTTP led to a lot of issues around enforcing contracts and harmonizing error handling. I can see how gRPC makes Hoarde's side cleaner, especially if the lambda exists solely to serve cache misses.

That said, there's a practical concern on the ML Platform side and other non-ML services willing to integrate. The vast majority of our internal services communicate over HTTP, and our infra (mesh, ingress, routing) is built around that. To integrate with gRPC-only Hoarde, each service team would need to either deploy an adapter/proxy alongside their service, or deploy a gRPC-capable replica. I've prototyped the adapter approach and discussed the replica route with Luca - both are technically feasible. But as Hoarde would onboard more use-cases, I can imagine this becoming a pattern where every integrating service carries extra infrastructure just to bridge the protocol gap. So we’re shifting complexity and maintenance from Hoarde to its clients.

The current design relies on a big assumption that lambdas only serve Hoarde, and Hoarde is the endpoint for consumers. I think it's worth investigating whether this assumption is valid and makes sense within our existing infrastructure, especially as we scale to more use-cases. If some services will need to remain reachable over HTTP for other consumers anyway, we should think about how we want to handle the protocol boundary.

Very curious to hear opinions from others! Pinging a few people I think might be interested: @isarantopoulos @elukey @Ottomata @klausman @achou

cc also @GGoncalves-WMF . I think your points are really important. We should do some good platform product management to see how capabilities like Hoarde provides can and will actually be used.

From my own experience: building platform capabilities (like streaming enrichment) without understanding how teams work and do things, there is a risk that the systems we platform engineers choose build will not be adopted, even if we choose the best technical option. The user story is important too!

Change #1249962 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] hoarde: initial commit of chart (vanilla)

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

Change #1249963 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] services: add linked-artifacts service

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

Change #1249978 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] hoarde: initial commit of chart (vanilla)

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

Change #1249979 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] services: add linked-artifacts service

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

Change #1249962 abandoned by Eevans:

[operations/deployment-charts@master] hoarde: initial commit of chart (vanilla)

Reason:

I didn't select `generic-application` when generating the chart on the first go round(s). I've recreated the changesets again (last time hopefully). The new chain is: https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1249978 & https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1249979

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

Change #1249963 abandoned by Eevans:

[operations/deployment-charts@master] services: add linked-artifacts service

Reason:

I didn't select `generic-application` when generating the chart on the first go round(s). I've recreated the changesets again (last time hopefully). The new chain is: https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1249978 & https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1249979

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

One thing of note about using gRPC vs. REST/HTTP(S) based communication is that a lot of the infrastructure we have built around LiftWing assumes HTTP services (e.g. using Envoy in HTTP mode). If we set up a gRPC service that services on LW call, or a gRPC service on Liftwing, we need to make sure that "the path is clear" in this sense, also regarding pod security policies and the like.

That said, there's a practical concern on the ML Platform side and other non-ML services willing to integrate. The vast majority of our internal services communicate over HTTP, and our infra (mesh, ingress, routing) is built around that. To integrate with gRPC-only Hoarde, each service team would need to either deploy an adapter/proxy alongside their service, or deploy a gRPC-capable replica. I've prototyped the adapter approach and discussed the replica route with Luca - both are technically feasible. But as Hoarde would onboard more use-cases, I can imagine this becoming a pattern where every integrating service carries extra infrastructure just to bridge the protocol gap. So we’re shifting complexity and maintenance from Hoarde to its clients.

To me the above is the main concern, since almost every service at the foundation runs HTTP..

Hii all! Wanted to bring up a discussion that came up while working on the Article Topics integration with Hoarde. It's about the lambda interface protocol and whether gRPC should be the only supported method or whether we should consider HTTP. I've been discussing this with both Eric and Luca, and I think there are valid points on both sides so I wanted to open it up here.

There is a very compelling case for gRPC - it gives us structured contracts, backward-compatible schema evolution, and built-in handling of timeouts and failure propagation. This is also based on previous experience with RESTBase, where using plain HTTP led to a lot of issues around enforcing contracts and harmonizing error handling. I can see how gRPC makes Hoarde's side cleaner, especially if the lambda exists solely to serve cache misses.

That said, there's a practical concern on the ML Platform side and other non-ML services willing to integrate. The vast majority of our internal services communicate over HTTP, and our infra (mesh, ingress, routing) is built around that. To integrate with gRPC-only Hoarde, each service team would need to either deploy an adapter/proxy alongside their service, or deploy a gRPC-capable replica. I've prototyped the adapter approach and discussed the replica route with Luca - both are technically feasible. But as Hoarde would onboard more use-cases, I can imagine this becoming a pattern where every integrating service carries extra infrastructure just to bridge the protocol gap. So we’re shifting complexity and maintenance from Hoarde to its clients.

The current design relies on a big assumption that lambdas only serve Hoarde, and Hoarde is the endpoint for consumers. I think it's worth investigating whether this assumption is valid and makes sense within our existing infrastructure, especially as we scale to more use-cases. If some services will need to remain reachable over HTTP for other consumers anyway, we should think about how we want to handle the protocol boundary.

Very curious to hear opinions from others! Pinging a few people I think might be interested: @isarantopoulos @elukey @Ottomata @klausman @achou

cc also @GGoncalves-WMF . I think your points are really important. We should do some good platform product management to see how capabilities like Hoarde provides can and will actually be used.

From my own experience: building platform capabilities (like streaming enrichment) without understanding how teams work and do things, there is a risk that the systems we platform engineers choose build will not be adopted, even if we choose the best technical option. The user story is important too!

One thing of note about using gRPC vs. REST/HTTP(S) based communication is that a lot of the infrastructure we have built around LiftWing assumes HTTP services (e.g. using Envoy in HTTP mode). If we set up a gRPC service that services on LW call, or a gRPC service on Liftwing, we need to make sure that "the path is clear" in this sense, also regarding pod security policies and the like.

That said, there's a practical concern on the ML Platform side and other non-ML services willing to integrate. The vast majority of our internal services communicate over HTTP, and our infra (mesh, ingress, routing) is built around that. To integrate with gRPC-only Hoarde, each service team would need to either deploy an adapter/proxy alongside their service, or deploy a gRPC-capable replica. I've prototyped the adapter approach and discussed the replica route with Luca - both are technically feasible. But as Hoarde would onboard more use-cases, I can imagine this becoming a pattern where every integrating service carries extra infrastructure just to bridge the protocol gap. So we’re shifting complexity and maintenance from Hoarde to its clients.

To me the above is the main concern, since almost every service at the foundation runs HTTP..

Apologies, I should have done this a few comments earlier, but:

This ticket was scoped for the deployment of the (MVP) service; This is somewhat off-topic here, I think. I've created T419734: RfC: Use of gRPC as Lambda interface for linked artifact caching, and copied the above quotes into a comment. Can we pick things up there instead?

Change #1250649 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] cassandra-http-gateway: new chart based on aqs-http-gateway

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

Change #1250650 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] charts/cassandra-http-gateway: template table configuration for hoarde

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

Change #1250651 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] services: add linked-artifacts service

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

Change #1248148 abandoned by Eevans:

[operations/deployment-charts@master] services: add linked-artifacts service & hoarde chart

Reason:

Abandoning in favor of the approach used in https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1250649

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

Change #1227851 abandoned by Eevans:

[operations/puppet@production] service, trafficserver: Prepare "linked-artifacts" k8s pod

Reason:

Abandoning in favor of the approach taken in: https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1250649?usp=search

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

Change #1249978 abandoned by Eevans:

[operations/deployment-charts@master] hoarde: initial commit of chart (vanilla)

Reason:

See https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1250649 instead

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

Change #1249979 abandoned by Eevans:

[operations/deployment-charts@master] services: add linked-artifacts service

Reason:

See https://gerrit.wikimedia.org/r/c/operations/deployment-charts/+/1250649 instead

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

Change #1250649 merged by jenkins-bot:

[operations/deployment-charts@master] cassandra-http-gateway: new chart based on aqs-http-gateway

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

Change #1250650 merged by jenkins-bot:

[operations/deployment-charts@master] charts/cassandra-http-gateway: template table configuration for hoarde

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

Change #1259188 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] charts/cassandra-http-gateway: configurable Cassandra keyspace

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

Change #1259188 merged by Eevans:

[operations/deployment-charts@master] charts/cassandra-http-gateway: configurable Cassandra keyspace

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

Change #1250651 merged by jenkins-bot:

[operations/deployment-charts@master] services: add linked-artifacts service

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

Change #1267075 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] cassandra-http-gateway: update version to 0.4.1 (April Fool's)

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

Change #1267075 merged by Eevans:

[operations/deployment-charts@master] cassandra-http-gateway: update version to 0.4.1 (April Fool's)

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

Change #1267229 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] Use cassandra-dev2001-a (instance) for lambda

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

Change #1267229 merged by jenkins-bot:

[operations/deployment-charts@master] Use cassandra-dev2001-a (instance) for lambda

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

Change #1267251 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] Add egress rule for cassandra-dev2001-a:50051

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

Change #1267251 merged by jenkins-bot:

[operations/deployment-charts@master] Add egress rule for cassandra-dev2001-a:50051

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

Change #1293726 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] linked-artifacts: configure staging for topics lambda

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

Change #1293726 merged by Eevans:

[operations/deployment-charts@master] linked-artifacts: configure staging for topics lambda

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

Change #1293732 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] linked-artifacts: fix typo-ed configuration param

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

Change #1293732 merged by jenkins-bot:

[operations/deployment-charts@master] linked-artifacts: fix typo-ed configuration param

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

Change #1293742 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] linked-artifacts: add egress rule for inference service

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

Change #1293742 merged by jenkins-bot:

[operations/deployment-charts@master] linked-artifacts: add egress rule for inference service

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

Change #1294387 had a related patch set uploaded (by Eevans; author: Eevans):

[operations/deployment-charts@master] linked-artifacts: deploy hoarde v1.3.1

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

Change #1294387 merged by jenkins-bot:

[operations/deployment-charts@master] linked-artifacts: deploy hoarde v1.3.1

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

Eevans claimed this task.

This is live in staging. Any remaining work can be made a part of T414140. Closing.