#!/usr/bin/perl
###
###  lb.pl -- load balancing script
###

$| = 1;

$name   = "143.126.211.241:808";     # the hostname base
$first  = 1;         # the first server (not 0 here, because 0 is myself) 
$last   = 2;         # the last server in the round-robin

$cnt = 0;
while (<STDIN>) {
    $cnt = (($cnt+1) % ($last+1-$first));
            $server = sprintf("%s%d", $name, $cnt+$first);
                        print "http://$server/VirtualHostBase/http/satie.culture.fr:80/s2/www.culture.gouv.fr/VirtualHostRoot/$_";
           }

##EOF##
#                                                
