Skip to content

Commit 4b1cde2

Browse files
committed
Add Write-behind (write-back) section
1 parent 09ee779 commit 4b1cde2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,3 +1347,21 @@ Write-through is a slow overall operation due to the write operation, but subseq
13471347

13481348
* 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.
13491349
* Most data written might never read, which can be minimized with a TTL.
1350+
1351+
#### Write-behind (write-back)
1352+
1353+
<p align="center">
1354+
<img src="http://i.imgur.com/rgSrvjG.png">
1355+
<br/>
1356+
<i><a href=http://www.slideshare.net/jboner/scalability-availability-stability-patterns/>Source: Scalability, availability, stability, patterns</a></i>
1357+
</p>
1358+
1359+
In write-behind, tha application does the following:
1360+
1361+
* Add/update entry in cache
1362+
* Asynchronously write entry to the data store, improving write performance
1363+
1364+
##### Disadvantage(s): write-behind
1365+
1366+
* There could be data loss if the cache goes down prior to its contents hitting the data store.
1367+
* It is more complex to implement write-behind than it is to implement cache-aside or write-through.

0 commit comments

Comments
 (0)