Accuracy is a relevant non-functional requirement in systems with complex data processing or a high rate of writes.
Accuracy of data means that the data values are correct and are not approximations.
Estimation algorithms trade off accuracy for lower complexity. Examples of estimation algorithms include HyperLogLog for cardinality (COUNT DISTINCT) estimate in the Presto distributed SQL query engine and count min sketch for estimating frequencies of events in a stream of data.
A cache is stale if the data in its underlying database has been modified. A cache may have a refresh policy where it will fetch the latest data at a fixed periodic interval.
A short refresh policy is more costly. An alternative is for the system to update or delete the associated cache key when data is modified, which increases complexity.
Consistency vs. Accuracy in Eventually Consistent Systems
- Accuracy is related to consistency, but they’re not the same.
- Eventually consistent systems trade off accuracy for higher availability, lower complexity, and cost.
- After a write, reads may not reflect the latest data immediately — leading to temporary inaccuracy.
- This state is called inconsistent, not inaccurate — the term used is consistency, not accuracy.