Yeah, if the while loop runs as fast as it can (it will) you will not just get a fast rate which might overwhelm the database connection, but you'll also not get a very 'even' rate of polling.
Try something like
$polllength = 1;
while(1) {
$polltime = microtime(true);
//poll function call;
$endtime = microtime(true);
$sleeptime = $polllength - ($endtime-$polltime);
sleep($sleeptime);
}
This way your polls are about $polllength seconds apart no matter how the polling function varies (it will due to INTARNETS)
EDIT: also, make sure there's a way out of that while loop but everyone should know that y'all
For load balancing, you want to be able to tweak the polllength value somehow, so as to not be completely hardcoded. Whether it be in a configuration file or whatnot is up to you, it might even be a value that increases as load increases. That's up to how it actually 'feels' to the end user and how the server is really faring. A good rule of thumb is that n threads max means n * (poll length / avg response time) users. Reaching beyond that limit would doubtlessly increase response times as the users wait for responses from the overwhelmed server.