← All questions
System DesignVery Hard· Scalability· Tenant Isolation· Performance

How do you handle a security requirement for exact tena...

When an exact scan becomes too expensive due to data volume, you must change the architectural approach rather than the security constraint. By partitioning the index by tenant, you ensure that the search selectivity is 1 within the shard. This allows you to perform approximate search on a smaller graph while still enforcing isolation at the storage level, though you must accept the operational cost of managing many individual index shards.

Code playground (Python)