Coordinated Design of Cache Consistency and Invalidation Recovery in High Concurrency Backends

Authors

  • Xiaoming Ma Hangzhou Yiyi Zhixing Technology, Hangzhou, China Author

Keywords:

backend architecture, cache consistency, concurrency control, transactional outbox, failure recovery

Abstract

Databases and caches jointly support typical read and write paths in high concurrency backends. When they are operated independently, successful writes, cache invalidation, and stale query fills can interleave and create races. This study examines single deletion, delayed double deletion, epoch token validation, and a combined strategy that integrates validation with invalidation replay in the cache-aside pattern. A finite-state model with one key, one reader, and one writer enumerates ten event schedules under specified partial-order constraints. Three delivery conditions are considered: normal delivery, loss of the first invalidation, and loss of all invalidations. Model execution shows that, under normal delivery, single deletion and double deletion leave stale cached data in two schedules and one schedule, respectively. Token validation eliminates these residual states under the stated assumptions but still fails when the first invalidation is lost. With successful replay, the combined strategy restores convergence within the model. These results distinguish two responsibilities: preventing stale requests from filling the cache and ensuring that invalidation eventually executes. Both require coordinated treatment. The contribution is a set of reproducible concurrency checks and a design framework that separates fill control, event recovery, and application read semantics. The experiment does not measure production-cluster throughput or establish global strong consistency.

References

Amazon Web Services. (n.d.). Timeouts, retries, and backoff with jitter. https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/

Debezium. (n.d.). Outbox event router. Retrieved October 18, 2026, from https://debezium.io/documentation/reference/stable/transformations/outbox-event-router.html

DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., Sivasubramanian, S., Vosshall, P., & Vogels, W. (2007). Dynamo: Amazon’s highly available key-value store. In Proceedings of the 21st ACM Symposium on Operating Systems Principles (pp. 205–220). ACM. https://www.allthingsdistributed.com/files/amazon-dynamo-sosp2007.pdf

Jepsen. (n.d.). Linearizability. https://jepsen.io/consistency/models/linearizable

Lamport, L. (1978). Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7), 558–565. https://lamport.azurewebsites.net/pubs/time-clocks.pdf

Lloyd, W., Freedman, M. J., Kaminsky, M., & Andersen, D. G. (2011). Don’t settle for eventual: Scalable causal consistency for wide-area storage with COPS. In Proceedings of the 23rd ACM Symposium on Operating Systems Principles (pp. 401–416). ACM. https://www.cs.cmu.edu/~dga/papers/cops-sosp2011.pdf

Lloyd, W., Freedman, M. J., Kaminsky, M., & Andersen, D. G. (2013). Stronger semantics for low-latency geo-replicated storage. In 10th USENIX Symposium on Networked Systems Design and Implementation (pp. 313–328). USENIX Association. https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/lloyd

Nishtala, R., Fugal, H., Grimm, S., Kwiatkowski, M., Lee, H., Li, H. C., McElroy, R., Paleczny, M., Peek, D., Saab, P., Stafford, D., Tung, T., & Venkataramani, V. (2013). Scaling Memcache at Facebook. In 10th USENIX Symposium on Networked Systems Design and Implementation (pp. 385–398). USENIX Association. https://www.usenix.org/conference/nsdi13/technical-sessions/presentation/nishtala

Peng, D., & Dabek, F. (2010). Large-scale incremental processing using distributed transactions and notifications. In 9th USENIX Symposium on Operating Systems Design and Implementation. USENIX Association. https://www.usenix.org/conference/osdi10/large-scale-incremental-processing-using-distributed-transactions-and

PostgreSQL Global Development Group. (n.d.). Transaction isolation. Retrieved October 18, 2026, from https://www.postgresql.org/docs/current/transaction-iso.html

Redis. (n.d.-a). Client-side caching introduction. https://redis.io/docs/latest/develop/clients/client-side-caching/

Redis. (n.d.-b). Distributed locks with Redis. https://redis.io/docs/latest/develop/clients/patterns/distributed-locks/

Redis. (n.d.-c). EVAL. https://redis.io/docs/latest/commands/eval/

Redis. (n.d.-d). EXPIRE. https://redis.io/docs/latest/commands/expire/

Redis. (n.d.-e). Key eviction. https://redis.io/docs/latest/develop/reference/eviction/

Redis. (n.d.-f). Redis cache-aside. https://redis.io/docs/latest/develop/use-cases/cache-aside/

Redis. (n.d.-g). Redis replication. https://redis.io/docs/latest/operate/oss_and_stack/management/replication/

Redis. (n.d.-h). Transactions. https://redis.io/docs/latest/develop/using-commands/transactions/

Richardson, C. (n.d.). Pattern: Transactional outbox. Microservices.io. https://microservices.io/patterns/data/transactional-outbox.html

W3C. (2021). Trace context. https://www.w3.org/TR/trace-context/

Downloads

Published

2026-10-18

Issue

Section

Research Articles