Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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]

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
add comment

I'm working on a news centric website thats been around for years and is steadily accruing more and more page redirects

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.

share|improve this answer
1  
This answer is potentially useful because it points to a limitation somewhere between "tens of thousands of redirects" and "1.8 million redirects" on a specified platform (AWS m1.xlarge). It would be even more useful if you had documented the actual response times for various numbers of redirects, e.g. for none, for one thousand, for ten thousand, for a hundred thousand, and for a million. –  Skyhawk Feb 12 at 20:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.