I am using an array as an attempt for "load balance" several RTMP servers.
$servers = array(
'1.1.1.1',
'2.2.2.2',
);
$edge = $servers[array_rand($settings)];
but this code does not help much; I end up with 3k on one servers 2k in the other.
I was thinking of taking advantage of APC and cache the last IP given, to keep track of aa better ip distribution among the users.
what I need is like the person gets ip 1.1.1.1 the next gets ip 2.2.2.2 to maintain the servers with a closer range of users instead of 3k on one and 2k in the other.
I could use MySQL, but I'll probably hammer the server with all the request.
what is the best way I can achieve a proper distribution of the ips?