feat: add cache write-behind disadvantage

This commit is contained in:
eylon.basirtman
2024-01-06 10:31:59 +02:00
committed by Ido Ophir
parent b4840dcdbc
commit 1dd1e9f55b

View File

@@ -1308,8 +1308,9 @@ Write-through is a slow overall operation due to the write operation, but subseq
##### Disadvantage(s): write through
* When a new node is created due to failure or scaling, the new node will not cache entries until the entry is updated in the database. Cache-aside in conjunction with write through can mitigate this issue.
* When a new node is created due to failure or scaling, the new node will not cache entries until the entry is updated in the database. Cache-aside in conjunction with write through can mitigate this issue.
* Most data written might never be read, which can be minimized with a TTL.
* Failure in "Store in the DB" may lead to cache storing data that was never committed to the database. For a strong consistency, it's necessary to update the cache and the database in a distributed transaciton that will roll back the cache in case of database failure. This adds complexity to the system.
#### Write-behind (write-back)