Relationship Index Contention Under Heavy Writes
0 reputation · 14 Oct 2022, 12:23 UTC
Relationship Index Contention Under Heavy Writes
The goal is to identify whether the built‑in relationship index in SpiceDB becomes a bottleneck when the system processes a high volume of concurrent write operations while serving authorization queries.
Constraints include a large relationship graph (hundreds of thousands to millions of entries), a write‑heavy workload, and the need to keep query latency within acceptable limits for real‑time authorization decisions.
Uncertainty surrounds how index updates compete with read evaluation paths and whether the database layer (PostgreSQL vs. SQLite) influences this contention. Without clear documentation on the interaction between write contention and query latency, optimization decisions remain speculative.
Specific questions to guide measurement:
- Does the relationship index become a hotspot under concurrent write traffic, and how can we detect it?
- What metrics (e.g., index lock wait times, cache hit ratios) should be collected to quantify index contention?
- How can we isolate index contention from underlying database write latency in performance tests?