6.2.2 Overview

The KCC automates management of the NC replica graph for each NC in the forest. In doing so, it maintains the following requirements:

  • There exists a path from each writable replica to every other NC replica (writable, read-only full, or read-only partial) of the same NC.

  • No path from a writable replica to another writable replica passes through a read-only replica.

  • For each domain NC, the path from a writable replica to another writable replica utilizes only the RPC transport (never SMTP [MS-SRPL]).

  • For each domain NC, the path from a writable replica to a read-only full replica utilizes only the RPC transport (never SMTP [MS-SRPL]).

  • Replication latency is short between NC replicas on DCs in the same site, at the expense of additional replication traffic within the site.

  • Replication traffic between sites is low, at the expense of additional replication latency between sites.

  • A state in which one or more DCs are offline or unreachable (temporarily or indefinitely) does not cause the replication latency across the remaining DCs to grow without bound.

  • Edges between DCs in different sites constitute a least cost spanning tree for an administrator-defined cost metric.

The KCC performs this work in a sequence of tasks called a "run". These runs execute periodically and on receipt of an IDL_DRSExecuteKCC request. The first periodic run of the Windows KCC begins 5 minutes after system startup. Subsequent runs execute such that the interval between the end of one run and the beginning of the next run is 15 minutes.

These tasks utilize the following inputs:

And produce or update the following:

  • Config NC objects: nTDSConnection

  • Abstract attributes of NC replicas: repsFrom, repsTo

  • Variables of DCs: kCCFailedConnections, kCCFailedLinks

The KCC individual tasks are detailed in the remainder of this section, and are executed in the sequence in which they appear in this document. In summary, these tasks are:

  • Refresh kCCFailedLinks and kCCFailedConnections.

  • Create intra-site connections.

  • Create inter-site connections.

  • Remove unnecessary connections.

  • Translate connections.

  • Remove unnecessary kCCFailedLinks and kCCFailedConnections.

To simplify the task descriptions, the following concepts are used:

  • An NC replica that "is present" on a DC. Given NC replica r of NC n and a DC with nTDSDSA object o, r "is present" on the DC if both of the following conditions is TRUE:

    • o!hasMasterNCs contains n or o!msDS-hasFullReplicaNCs contains n or o!hasPartialReplicaNCs contains n.

    • One of the following two conditions is TRUE:

      • o!msDS-HasInstantiatedNCs contains no value v where the dsname portion of v = n. (In this case n is in the process of being instantiated.)

      • o!msDS-HasInstantiatedNCs contains a value v, where the dsname part of v = n, and the binary part of v (DWORD in big-endian byte order) is an integer such that the IT_NC_GOING bit is clear. (In this case n is instantiated, and is not in the process of being uninstantiated.)

  • An NC replica that "SHOULD be present" on a DC. Given NC replica r of NC n and a DC with nTDSDSA object o, r "SHOULD be present" on the DC if r is one of the following:

    • A writable replica of the config NC, the schema NC, or the DC's default NC on a writable DC.

    • A full read-only replica of the config NC, the schema NC, or the DC's default NC on an RODC.

    • A writable replica of an application NC for which there exists a crossRef object cr such that cr!nCName = n and cr!msDS-NC-Replica-Locations contains a reference to o.

    • A full read-only replica of an application NC for which there exists a crossRef object cr such that cr!nCName = n and cr.ms-DS-NC-RO-Replica-Locations contains a reference to o.

    • If the DC is a GC server (that is, if bit NTDSDSA_OPT_IS_GC is set in o!options), a partial replica of a domain NC n such that n ≠ the DC's default NC, and there exists a crossRef object cr such that cr!nCName = n.

  • An nTDSConnection object "implies" a tuple in the repsFrom abstract attribute of an NC replica (and a corresponding edge in an NC replica graph). An nTDSConnection object cn implies a tuple in r!repsFrom for NC replica r of NC n on the DC with nTDSDSA object t, if each of the following is TRUE:

    • cn is a child of t.

    • cn!fromServer references an nTDSDSA object s.

    • An NC replica of n "is present" on s.

    • r "SHOULD be present" on t.

    • The NC replica on s is a full replica or r is a partial replica.

    • n is not a domain NC, or r is a partial replica, or cn!transportType has no value, or cn!transportType has an RDN of CN=IP.