I am using Berkeley db with replication (high availability ).
I want to ask if i use the DB_NOSYNC flag would be any problem with the Durability of the system?
I know that if there is no sync, data is not stored from memory to hard disk and i will lose uncommited transactions on system failure. Right?
But i read in a thread that if you use Replication, all transactions pass to clients so there no loss if master server fails?
I would like your knowledge about this issue.!
It sounds as if you're talking about the DB_TXN_NOSYNC flag, rather than DB_NOSYNC.
You mention that in general, you lose uncommitted transactions on system failure. I think what you mean is that you may lose some committed transactions on system failure. This is correct.
It is also correct that if you use replication you can arrange to have clients have a copy of all committed transactions, so that if the master fails (and enough clients do not fail, of course) then the clients still have the transaction data, even when using DB_TXN_NOSYNC.
This is a very common usage scenario for Berkeley DB replication/HA, used to achieve high throughput. You will want to pay attention to the configured ack policy, group size setting, setting of the 2SITE_STRICT option (if group size == 2).