ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Goncharuk <alexey.goncha...@gmail.com>
Subject Re: Atomicity mode and read-after-write consistency
Date Tue, 08 Mar 2016 20:57:21 GMT

Consistency between nodes is guaranteed in ATOMIC mode, however, the
read-after-write guarantee is met in the following cases:
 - cache write synchronization mode is FULL_SYNC. In this mode cache.put()
will not return control until all data nodes (primary and backup)
responsible for the data are updated. See
 - cache write synchronization mode is PRIMARY_SYNC, but reads from backups
are forbidden by setting CacheConfiguration#readFromBackup to false. In
this mode cache.put() will return control after the primary node has been
updated (backup nodes may not be updated yet), the the read consistency is
guaranteed because reads always happen from primary nodes.

Both modes have it's implications on performance - FULL_SYNC mode comes at
a slightly slower update performance while it allows more frequent local
reads using backups; PRIMARY_SYNC allows for a better update performance,
but the restriction for always-primary reads will result in more frequent
network calls for reads. It's up to you to decide which configuration suits
better for your use-case.

Hop this helps,

View raw message