drupflare/worker - v1.0.4
    Preparing search index...

    Function replicaCount

    • How many replica lanes a site has, beyond the primary; unset, unparseable and negative are 0.

      The ceiling is ID_PARTITION_LANES: a lane mints forwarded ids from its residue class modulo ID_PARTITION_LANES + 1, so lane 257 would wrap onto the primary's class and two writers would mint the same id. replica-demand.ts has a smaller REPLICA_MAX_LANES for autoscaling.

      It sets how many buckets the router hashes over; above the provisioned count that routes to objects that do not exist (a wasted hop and a primary retry). chooseTarget() takes max(this, believedLanes).

      Parameters

      • Optionalenv: { REPLICA_COUNT?: string }

      Returns number