I am developing a website where client needs that any notification should reach as soon as it is created. so i am using setinterval function of jquery and using ajax requests to get the notifications. the time interval I set is 2 seconds. and its not the only ajax request which is going this way. there are following ajax request being done within interval of 2 sec
- get notifications
- get messages.
- get counts.
- some other checks
I am worried because i think sending this much request at very short time period may disturb the system. and worse if the number of users increase. Please tell me your opinions and solutions to this if this is wrong aproach