I am following this document.
https://docs.microsoft.com/en-us/azure/azure-sql/database/read-scale-out
From document, I found that there is one read-write replicate and other read-only replica available as per service tier. Also there is paragraph about "Data consistency". It is mention that, data will be async written to read replica so there is chance of replication leg. Now if there is some operation performed on read-write replica and before it get replicated to other replica if that primary read/writer replica get failed then is my will loss? Is there any configuration by which I can say that if data written to atleast 2-3 replica synchronously then only write operation get success.
Any suggestion or help would be highly appreciated.
CodePudding user response:
No, there will be no data loss as transactions will be committed in the transaction log, which is saved in an Azure Storage account that provides automatically protection against data loss by providing redundancy (https://docs.microsoft.com/en-us/azure/storage/common/storage-redundancy?toc=/azure/storage/blobs/toc.json). Azure SQL (and SQL Server) uses Write-Ahead Log (WAL) to make sure no transaction can be considered concluded unless it has been written in the transaction log. (https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-log-architecture-and-management-guide?view=sql-server-ver15).
