Checking server load with PHP and taking appropriate action
Posted
by teehoo
on Stack Overflow
See other posts from Stack Overflow
or by teehoo
Published on 2010-05-01T16:41:08Z
Indexed on
2010/05/01
16:47 UTC
Read the original article
Hit count: 280
Hi, I'm creating a project in which a server receives operations from clients to apply to a local server document. The server and client both share the same document and therefore each message the client sends contains an MD5 hash, which the server compares to after generating its own hash to ensure the server and client documents are synchronized.
My question is, if the server is overloaded, could I somehow detect this in PHP, which would in turn let me decide whether I want to execute the hash generation function or not?
Perhaps in the scenario defined, this is not a perfect use-case, but I'm interested in this approach in general.
© Stack Overflow or respective owner