• Nils Goroll's avatar
    shard director: add optional weight parameter to .add_backend() · b90b60d0
    Nils Goroll authored
    We implement weights by scaling the number of replicas of each backend.
    The replicas parameter of .reconfigure() remains a minimum.
    
    For existing vtcs, the Debug hashcircle output has been compared
    before/after this change to ensure that behaviour is exactly equivalent.
    
    For for wighted backends, it has been checked that the number of
    instances per host on the hashcircle matches the expectation.
    
    Also refactor and clean up some of the code:
    
    - consistently make the number of ring points a uint32_t
    - some constification
    
    Ref #3276
    b90b60d0
vmod.vcc 22.3 KB