Extend zoekt model with zoekt-only/graph-only setting
We should also add a setting to our “Zoekt node” models to mark them as “zoekt only”, “kuzu only”, or “zoekt and kuzu”. A “kuzu only” node will not be allocated new zoekt indexes and vice versa. This will give our operators the most flexibility to roll out changes while keeping as much infrastructure shared as possible. It also keeps deployment simple for self-managed as they can choose to use a single “zoekt and kuzu”. This will be particularly useful during our early rollout as we move more quickly with the knowledge graph rollout without fear of taking down our GA Zoekt service. Additionally it may help with long term scalability if the different processes require different resources (e.g. memory or CPU). Furthermore it could simplify our monitoring as separate services would be easier to correlate resource usage (or incidents) with changes in a specific service.
Implementation details
Zoekt-indexer which runs on zoekt nodes will handle both zoekt tasks and knowledge graph tasks. To make it simple for the initial development phase, we will control manually which nodes run which service (we can just update node metadata through Rails console). Before release we will still have to decide if we control this from node side (node sends list of services) or we do this categorization automatically on server side, anyway user should be control what services run on what node. Rails server will schedule zoekt / knowledge graph tasks only on supported nodes.