Re: Redirects and rewrites and performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Le 20/09/2021 à 18:29, Dave Wreski a écrit :
Hi,

At what point does it begin to affect performance with the number of redirects and rewrites being used on a website? Have there been any performance studies on this?

I've never seen such benchmark up to now.


We have a website (linuxsecurity.com) that's been around for decades, through many migrations, and have collected many (~10k) redirects along the way.

We've also gone through a Joomla migration from the old /content/view/33/45 style links to the SEF/title alias format, and have a script that translates those dynamically as requested.

Of course it depends on server load and other factors, but when does it become a point where searching through thousands of links that Apache has stored in memory results in some significant additional delay?

Are there other methods of doing these redirects?

Have a look at RewriteMap with dbm files [1], [2].
It looks like what you are looking for.
Your conf file will be much smaller using an indexed file format should highly reduce the overhead of thousands of redirections to check.

Would implementing them in Joomla directly make any difference, or only add another layer of abstraction?

I think that it would add another layer of abstraction.


Here's one example of a rewrite we're currently using:
RewriteRule ^/features/features/verifying-linux-server-security-what-every-admin-needs-to-know$ /features/features/verifying-linux-server-security [L,R=301]

RewriteRule ^/advisories/fedora/fedora-25-rubygem-rmagick-security-update$ /advisories/fedora/fedora-25-rubygem-rmagick-security-update-15-25-00-217101 [L,R=301]

If all your rules are like that (i.e. if you don't have regex), the above RewriteMap dbm should be just fine.

Also, is there a way to trace a specific redirect? I've somehow created a redirect loop with one of our articles, but enabling tracing on the whole site will create a significant amount of data that makes it very difficult to focus on just the one I'm interested in.

I don't think it is possible.

CJ

LogLevel warn ssl:error auth_digest:error socache_shmcb:warn mpm_worker:warn fcgid:info cache_disk:debug log_config:debug rewrite:trace3

Thanks,
Dave

[1]: https://httpd.apache.org/docs/2.4/en/mod/mod_rewrite.html#rewritemap
[2]: https://httpd.apache.org/docs/2.4/en/rewrite/rewritemap.html#dbm

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux