reddit effect and my vps gets unusable
I'm hosting a news portal on my 1024 linode. The portal is often visited by a news agregator which has enormous populatrity. That news agregator is THE most visited web service in my country.
Whenever an articles gets promoted on the landing page of this agregator, I witness the reddit effect on my traffic graphs. I suppose this happens because of the small thumbnail displayed by the short news paragraph which seems to get pulled from the source (my news portal) each time a new visitor opens the agregators landing page.
The portal is made with Wordpress on Apache in prefork with nginx proxy for static content, caching plugin, apc opcode cache, etc, etc…
The problem is that my VPS gets completly lagged when the reddit effect appears. I can hardly ssh to it, let alone do something else with it. What is more confusing, processor time doesn't go beyond 60%, and there is plenty of free memory to go around, yet the whole server gets incredably slooooooow… often with timeouts.
Now. Since nginx is the proxy which serves static content, and the agregator pulls only that one picture from that one news which got promoted at that point of time, I tend to blame nginx or the nginx-apache communication for all this mess.
But I am not sure since I am not a networking expert. Would love to hear your thoughts thоu.
Thank you,
Gjoko.
3 Replies
Is there some reason you need apache? Nginx handles load better.
Check all the log files for obvious warnings or errors.
Think about installing varnish in front of the web stack.
Check APC (assuming you are using it) has enough ram although if the load isn't touching PHP that's not the problem.
Cloudflare might just solve all your problems.
I've observed some significant "bufferbloat" issues with Linode's shaper when that limit was reached before, causing very bad performance and timeouts.