Scaling Search and Indexing
In this lesson2 sections
Scaling Search and Indexing
Problems with the proposed design
While the design from the previous lesson is functional, it has significant drawbacks regarding resource usage and scalability:
Colocated indexing and searching: Running both operations on the same node causes resource contention. Since both indexing and searching are resource-intensive, they degrade each other’s performance. This design also prevents independent scaling of search and indexing resources based on load.
Repeated index construction: Building the same index independently on every replica repeats analysis and indexing work. Copying a finished index can save that CPU, although the alternative consumes network bandwidth and introduces publication delay.
To address these issues, we need an alternative approach that decouples these operations.
Solution
Instead of recomputing the index on every replica, the system computes the inverted index once on the primary node. The resulting index file is then distributed to the replicas. This approach reduces CPU and memory usage by avoiding redundant computation.
The rest of this lesson is for Premium members
Premium opens every lesson in this course, along with all questions and solutions on PracHub.