I'm working on a news centric website thats been around for years and is steadily accruing more and more page redirects. Currently we have around 375 redirects and are adding about 5-10 a month.
I know that NGinx is very, very fast at handling redirects, but presumably there must be some number of redirects that will affect performance in a meaningful way, and I would feel better if I knew how many that would be. Hundreds? Thousands? Millions?
We are able to handle large volumes of traffic by caching popular pages for a minute or two at a time in Memcached (reducing load on our database, the obvious bottleneck), but NGinx still has to route that traffic.
Is this something I should be at all concerned about? How many redirects is too many for a high traffic website?
[originally posted at StackOverflow]
A redirect is not really a problem as there's no backend being contacted. Just Nginx. And Just Nginx is really, really fast. As in 10,000+ connections per second fast
You should probably worry more about a cluttered configuration file before you worry about if Nginx can handle it.
As a bonus, I was recently working on a full page caching solution with Nginx and I used Memcached as well, a neat trick to improve performance some is to use the upstream keepalive module to keep your connections open.
It only works with Memcached backends, though, so don't use it with any sort of fastcgi or HTTP proxying.
Working on a similar project, I've included an Nginx conf with our 1.8 million accrued redirects on an AWS m1.xlarge (4 CPU, 8 ECU, 15 GB memory).
With 1.8 million redirects, Nginx reloads fine but the response times are of the order of several seconds when put under a load of a single concurrent user.
It seems to perform OK with tens of thousands of redirects.