Interesting Things
Somebody was seeing mongrels hang when using an older copy of the S3 gem. It turned out the older version had the option for persistent connections defaulting to true. Setting
:persistent => falseor using a newer version that hasfalseas the default fixed their problemOne of our sites was seeing a unbalanced distribution of requests despite the fact that the load balancer was evenly distributing connections. One host typically had 2x the traffic of the others, and it would switch every few hours to be a different host. It turned out to be the Google crawler, which uses a keepalive, getting stuck on a single host and making a lot of requests. The load balancer is only able to balance TCP connections, which Google is only using a single one of. The likely solution will be haproxy or something similar in front of the hosts to better distribute traffic.
Another option for the bot issue is to dedicate a single host to just bots. That way you make sure everything gets crawled, but also you can then tweak that host (less horsepower) to make sure your big servers keep dealing with the customer load.
March 4, 2009 at 2:06 pm