mod_rewrite external RewriteMap in high-load setup

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

 



Hello to all,

 

I have a question regarding the use of an external RewriteMap (prg) on a high-traffic website.

 

My goal is to implement a redirection at the root of the site, depending on some request attributes (User-Agent and more) sent to an external HTTP service.

So I implemented a perl script which acts as a RewriteMap. It works like expected and performs the server-side HTTP call to the external service.

The script is small and quite fast, however, because it involves calling an external server, it will at any time take about 50ms and more to complete.

 

As under heavy load I can expect up to 100 calls per second, this is will lead to concurrent calls for sure. I know that I can prevent concurrent calls to the script by using RewriteLock. But for my understanding this will queue up the calls, which would introduce a major bottleneck to the application in this situation.

 

So I would rather prefer to use a multi-threaded approach of the RewriteMap instead of the lock. Is anything like this possible?

If not: Do you see any alternative approaches to the problem? For example writing a custom apache module?

 

Thanks in advance for any hints.

 

Matthias


[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