Cost Intelligence

GKG Unit Economics
Interactive Model

Live cost model for the GKG/Orbit service. Adjust variables to explore the impact of query volume, traffic mix, and pricing on gross margin. Maps to the Snowplow telemetry plan so we know which inputs will be measured vs estimated.

Infrastructure (Monthly)
ClickHouse Cloud iThird-party managed database (ClickHouse Inc.) that stores and traverses the knowledge graph. Every GKG query hits ClickHouse. Estimate from ClickHouse engineering: $5K-$40K/month. Range is wide until a production load test narrows it. Angelo owns this estimate. $15,000
$5K$40K
GCP Compute iGitLab's GCP cost for running the Rust indexer service and the GKG API server. Covers container compute, networking, and load balancing. Not attributable per query until the gl_service:gkg GCP billing label is applied. $5,000
$1K$20K
GCP Storage / Indexing iGCP cost for storing raw repo data before it lands in ClickHouse, plus the ongoing incremental indexing pipeline. Includes GCS buckets and Pub/Sub. Smaller than compute but grows with the number of indexed namespaces. $1,500
$500$10K
Query Volume
Queries / Month iTotal GKG queries across all sources: Duo Agent Platform (DAP), MCP-connected agents (Claude Code, Codex), and glab CLI. This will be directly measured by Snowplow as the count of knowledge_graph_query events. Feeds the North Star WAN metric. 100,000
1K5M
DAP % (zero-rated) iQueries from Duo Agent Platform are zero-rated: the customer pays nothing extra. GKG is treated as COGS for DAP. High DAP% means more cost with no direct revenue. Justified only if GKG measurably improves DAP quality. Must be confirmed with with/without GKG performance data before GA. 60%
0% (all external)100% (all DAP)
DAP: 60K queries External: 40K queries
Pricing Levers
Credits / External Query iHow many GitLab Credits are consumed per MCP or glab CLI query. This is the primary pricing lever for external agents. Not yet decided โ€” pending Customer Zero data and WTP research. Bill's position: price to value, not cost. 90% GM is the floor. 1.0
0.110
$ / GitLab Credit iThe dollar value of one GitLab Credit. Credits are purchased in bulk by customers. The effective rate varies by tier and commitment. This converts Credit consumption into revenue. Confirm current list price with the pricing team before GA. $0.0030
$0.0005$0.01
Avg Cost / Query (variable) iThe marginal ClickHouse + GCP cost per query, excluding fixed infra. Highly variable in practice: a simple lookup costs far less than a 5-hop cross-namespace traversal. This is an average. Until production load test data is available, treat as a rough estimate. Key unknown for pricing. $0.0002
$0.00001$0.005
Monthly Revenue
$0
External queries only (Credits billed)
Monthly Infrastructure Cost
$21,500
ClickHouse + GCP fixed + variable
Gross Margin
โ€”
Revenue minus COGS
DAP Subsidy Cost
$0
What GitLab bears for zero-rated DAP queries
Cost Waterfall
Where the money goes each month
Variable query cost = avg cost/query ร— total queries. Fixed infra allocated proportionally across all queries.
Traffic Mix Economics
DAP queries are COGS for Duo; external queries are billable to customers
DAP (Zero-Rated)
Duo Agent Platform
QUERIES / MONTH
60,000
COST TO GITLAB
โ€”
Customer pays nothing. GitLab bears the full infra cost. GKG is COGS for DAP, not a standalone revenue line. Justified if GKG demonstrably improves DAP quality and retention.
External Agents (Billed)
MCP / glab CLI
QUERIES / MONTH
40,000
REVENUE
โ€”
Billed via GitLab Credits. Customer controls usage. Premium or Ultimate + Credits required. Requires admin to enable the feature flag and group-level settings.
Per-Query Economics
Unit economics for external (billable) queries
Revenue / Query
โ€”
Credits ร— $/credit
Variable Cost / Query
โ€”
CH + GCP marginal cost
Contribution Margin / Query
โ€”
Before fixed infra allocation
Break-Even (External Queries)
โ€”
Queries to cover all fixed infra
Fixed Cost / Query (blended)
โ€”
Total infra รท total queries
Implied GM Target Price
โ€”
Price for 90% GM floor (Bill's requirement)
Telemetry Coverage
Snowplow Instrumentation vs Cost Model Inputs
Which variables in this model will be directly measured by product analytics vs estimated. Source: Snowplow instrumentation spec + schema work item.
Cost Model Variable Snowplow Field / Event Status Notes
Total queries / month count of knowledge_graph_query events In spec Direct measure. North Star input (WAN = weekly active namespaces with ≥1 query).
DAP vs External split query_source or client_type field on context Partial Context schema has correlation_id and namespace_id. Explicit query_source (DAP vs MCP vs glab) needs to be added to the custom context.
Per-namespace query volume namespace_id in knowledge_graph_context In spec Required for WAN metric and per-namespace billing rollup. In custom context spec.
Revenue attribution (who to bill) root_namespace_id in knowledge_graph_context In spec Top-level group of the caller. Required for Credits billing rollup. In custom context spec.
Credits consumed (revenue) Not in Snowplow Gap Credits deduction happens in the subscription/billing system. Needs a separate data pipeline from Customers Portal or GitLab Credits service. Not a Snowplow concern.
ClickHouse variable cost per query Not in Snowplow Gap Internal cost โ€” requires ClickHouse billing export + query-level attribution. Needs GCP billing label (gl_service: gkg) to be live. Not observable from product analytics alone.
GCP compute cost per query Not in Snowplow Gap Same as above. GCP cost dashboards will be unlocked once gl_service label is applied to GKG infra resources. Assign to Bohdan / @stigchelaar.
Query complexity / join depth Not in spec Gap Key driver of ClickHouse cost variability. Multi-hop traversals over the edge table are more expensive. Would need query execution metadata (hop count, nodes traversed) โ€” OTel span or custom context field.
Indexing cost per namespace Not in spec Gap Fixed cost of initial + incremental indexing per group. Relevant to "free indexing for .com/Dedicated" pricing decision. Needs storage + compute cost per namespace from GCP billing.
Weekly Active Namespaces (WAN) Derived: distinct namespace_ids in 7-day window In spec North Star metric. Computable from Snowplow events if namespace_id is present on every query event.
Known Unknowns
ClickHouse variable cost per query
Wide range ($5K-$40K/month estimate from ClickHouse engineering). The variable component per query depends on join fanout and multi-hop traversal depth. Need a representative load test with production-shaped data to narrow this. Angelo owns variable cost estimate โ€” was due 2026-04-16.
GCP cost attribution
No per-query GCP cost data until the gl_service label is applied to GKG infra. Once live, GCP Billing export will show compute and storage costs filterable by service. This is the prerequisite for any real cost-per-query on the infra side.
Query complexity distribution
A simple "what namespaces does this user have?" query costs pennies. A 5-hop cross-namespace dependency traversal could cost 100x more. Until we have production traffic data, cost-per-query is an average that may hide dangerous tail costs.
Willingness to pay (WTP)
No customer WTP data yet. Bill explicitly rejected cost-plus pricing. Price-to-value is the target, but requires Customer Zero data and design partner usage to establish what outcomes GKG delivers and what customers would pay for them.
DAP value attribution
The DAP zero-rating decision ("GKG is COGS for DAP") needs to be justified with data: does GKG measurably improve DAP quality/outcomes enough to warrant the infra cost? This is the Duo with/without GKG performance comparison โ€” Meg + Angelo, due before GA.
Self-managed pricing model
SM pricing is deferred to Q2 FY27. Current thinking is GB-size tiers, but Bill wants usage-based pricing consistent with .com to prevent arbitrage. No cost model exists for SM yet โ€” storage + compute runs on customer infra, not GitLab's.
Internal use only. Not for distribution.
Last updated: April 2026. Estimates based on ClickHouse engineering input ($5K-$40K/month range) and team pricing meeting (2026-03-21).
Actual costs will be validated with representative load testing + GCP billing data once gl_service label is applied.