wiki:SecondaryManager

Secondary Manager

  1. Introduction
  2. Relationship between secondary manager and other modules
  3. Secondary Manager Work Flow
  4. Recommended Implementation of Timer

Introduction

The secondary manager is one of the co-operating processes of BIND10, which keeps track of timers and other information necessary for BIND 10 to act as a slave. It can be started up by MoB (Master of BIND10), or as a normal UNIX process.

Relationship between secondary manager and other modules

relationship between secondary manager and other modules_png_file_version_1

Features of note:

  • Auth server is responsible for receiving notify-in message, check allow-notify list and reply to notify. Before reply to notify, auth server should first send the notify information(master address of notify, zone name) over msgq to secondary manager, then get the confirmation response from secondary manager. Notify reply will not be sent out if auth server can't get the confirmation response from secondary manager. By this way, we can make sure that auth server will get the same notify message again if secondary manager doesn't work at one monment.)

  • Secondary manager should send zone transfer command over msgq to Xfrin, when:
    • zone is expired.
    • zone needs refresh(retry).
    • zone receives notify message.
  • Xfrin needs send out command "zone_new_data_ready" after finishing one zone transfer. Secondary manager should reset zone's refresh/expire time when receiving command "zone_new_data_ready".
  • Xfrout should notify its slaves when receiving command "zone_new_data_ready".

Secondary Manager Work Flow

secondary manager work flow

  • Secondary Manager will maintain some information (master_ list, zone_soa, zone_timeout, notifier_master) for each zone. zone_timeout is expressed in seconds since the epoch; the zone will need to do refresh if the value of zone_timeout is less than current time.
  • Zone_timeout value can be modified by the following operations:
    • zone refresh success: zone_timeout = now + zone_soa.refresh
    • zone refresh fail: zone_timeout = now + zone_soa.retry
    • Received zone notify-in message: zone_timeout = now
  • Secondary manager should set proper jitter time to zone's refresh time, to avoid many zones do transfer concurrently(jitter should not be bigger than half of the original value), the actual refresh time should be in the range (refresh_time - jitter, refresh_time).

Recommended Implementation of Timer

Timer can be implemented by using select() call, the socket which waits for notify-in will be added into rlist, and set timeout value to mininum zone_timeout, then start the timer. If a notify-in message is received before timing out, it will handle notify-in, else it will wait until timeout. Then the loop continues utill shutdown command is received.

while True:
    …
    rl,wl,el = select(rlist,NULL,NULL,timeout)
    …
       
Last modified 7 years ago Last modified on Oct 20, 2010, 1:13:58 PM

Attachments (6)

Download all attachments as: .zip