public OvhLoadBalancingTask loadBalancing_serviceName_backend_backend_setWeight_POST ( String serviceName , String backend , Long weight ) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}/setWeight" ; StringBuilder sb = path ( qPath , serviceName , backend ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "weight" , weight ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ; return convertTo ( resp , OvhLoadBalancingTask . class ) ; }
Set the weight of a backend . For instance if backend A has a weight of 8 and backup B was a weight of 16 backend B will receive twice more connections as backend A . Backends must be on the same POP for the weight parameter to take effect between them .