|
Forget Running a Chatbox on a Shared Host |
Many people think that a Chtbox such as Flashchat is very cool on a website and someties it can be very useful... Problem though is that most hosts do not allow a Chatbox on their servers becasue ofthe extremely heavy load on the server resources.
Information gathered from the very popular product FlashChat (tufat) shows the following:

Each 3rd second code is calling a file at the server for execution called Refresh and is used for receiving messages to the PC. Sending messages from PC will be instant when user hits the Send/Enter button. This file will call all the Chat server php scripts that do the MySQL database calls and the file will return to the PC a XML message of about 100-200 bytes with all the messages that have to be sent to PC for display incl login/logout etc etc. or just an "empty" message of 60 bytes that there is nothing to report. This happens for each PC/each 3rd second that is you will have for 10 users 10 executions of that calling file on average each 3rd second or in other words with 10 users we will will have 12.000 Web Server hits per hour. With an average of 4 MySQL queries per refresh there will be approx 48.000 MySQL queries per hour (10 users) and if your webhosting have set the upper limit to 50.000 there is no possibility to have more users in refresh mode and your webhost will be very unhappy and block and/or terminate yiour account!!
So in other words: Forget running Chat on a shared host!
What do you need to run? You must have a dedicated server, or the ability to run PHP processes on your remote host. Most shared web hosts do not permit thisL You should consult with your web host to determine if they will allow this or not. With an (expensive) dedicated server it’s probably not an issue, because you can typically run any processes that you wish.
|