Questions about always on’s data synchronization method

MINJAE KO 0 Reputation points
2024-07-20T04:10:57.85+00:00

Hello I am curious about data synchronization of secondary in always on.

Secondary confirmed that the redo thread reads the log cache or redo log file and synchronizes it to the data file and index file. I have doubts about the synchronization method here.

  1. Is replaying a redo log different from checkpoint?

I have seen information that checkpoint do not occur in secondary. Then, I think that in order to synchronize the data, the log will be read every time and the data will be written immediately, but I am curious about the details of how redo log replay is performed here. (How is the data in the redo log structured? Is the log left on a transaction basis and simply re-executed? I am curious about this internal aspect.)

  1. I am curious as to whether the buffer cache is not used when synchronizing data. As far as I know, sql server writes simple data inputs to the buffer cache and synchronizes them to the data file when a checkpoint occurs. Since checkpoint do not occur in the secondary, data is not uploaded to the buffer cache, and I wonder if dirty pages do not occur as a result.
  2. I am curious about what advantages there are to synchronizing data in a different way than primary.

My guess is that data that cannot be synchronized while a checkpoint occurs may be lost when a fail over occurs, so the redo log is replayed(?) to enable quick real-time synchronization.

I have a lot of questions about the internal workings of sql server. This is because we believe that successful service operation is possible only by understanding these details. This is a lot of questions, but I look forward to your answers. thank you

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,318 questions
0 comments No comments
{count} votes