Cache的三种pattern:write-through, write-around, write-back

Write-through: data is written simultaneously to the cache and disk storage. But the ack of the write is not sent to the application until the database write successfully completes the write.

Write-around: data is written to the database first, then a copy of that data promoted up to the cache.

Write-back: only update the cache and later the cache will update the database
asynchronously. However, the ack to the applications comes after the data is written to the cache, not to the database, which means ack occurs at the flash speed. But it may suffer data loss when cache fails before data has been flushed to the disk.

Comparing write-through, write-back and write-around caching


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s