From: Kirk Haines Date: 2010-08-13T00:00:43+09:00 Subject: Re: Fast proxy On Thu, Aug 12, 2010 at 8:26 AM, Diego Bernardes wrote: >> Actually testing on my notebook, apache could serve some image 7000 >> times a second, using em-proxy poiting to the same apache server, i >> could only get 2000 times a second, and i did nothing on em-proxy, just >> get from one side and send to another. >> >> >> Have any way to this faster? > > forgot to say, and taking that id and inserting into redis reduce the > performance to 1500 req/s One can proxy very, very fast with Ruby and EM. Fast enough that messing with redis will, by a long shot, be your bottleneck. I suggest not doing it that way if you need really high speeds. Were it me, I'd write a simple server to itself return the image, and I'd throw records of images served into a log. That lets you decouple serving the image with recording it in redis, and it makes it trivial to break that task up into multiple pieces, or take advantage of off-peak times to catch up on data loading if your peak times actually serves images faster than the data can be stuffed into redis. Kirk Haines