Which mitigation technique for cross-shard queries involves precomputation via background jobs?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

Which mitigation technique for cross-shard queries involves precomputation via background jobs?

Explanation:
Cross-shard queries are slow because they force work across multiple shards and bring in network latency and coordination overhead. The technique that addresses this by doing the heavy lifting in advance with background workers is precomputation via background jobs. By running asynchronous jobs to compute joins or aggregations and storing the results in a read-optimized form (such as a materialized view or a denormalized snapshot), the query path can fetch data quickly from a single source without touching multiple shards. This separation lets you balance freshness and latency, refreshing the precomputed data on a schedule or in response to events. Caching and denormalization are related approaches to improve read performance, but they don’t inherently define precomputation via background jobs, so the best-fit answer centers on the background-job precomputation strategy.

Cross-shard queries are slow because they force work across multiple shards and bring in network latency and coordination overhead. The technique that addresses this by doing the heavy lifting in advance with background workers is precomputation via background jobs. By running asynchronous jobs to compute joins or aggregations and storing the results in a read-optimized form (such as a materialized view or a denormalized snapshot), the query path can fetch data quickly from a single source without touching multiple shards. This separation lets you balance freshness and latency, refreshing the precomputed data on a schedule or in response to events. Caching and denormalization are related approaches to improve read performance, but they don’t inherently define precomputation via background jobs, so the best-fit answer centers on the background-job precomputation strategy.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy