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 just wonder can Apache routing be slow?

My situation is this in. I define a ProxyPass, to different the incoming request ( for example, www.example.com ) to the relevant port ( for example, port 81), then at the httpd.conf for the example.com, I will have a few rewrite rules, some of them will direct the request to other domains. The reroutes will at most occurs 3 times. This means that the www.example.com will be reroute to port: 81, and if it matches a certain condition, then it might be rewroute to blog.example.com. And the blog.example.com will then be reroute to port 83 of another pc.

Do you think that such a reroutes will eat up a lot of time?

share|improve this question
add comment

migrated from stackoverflow.com Aug 1 '09 at 13:14

This question came from our site for professional and enthusiast programmers.

3 Answers

In general I would say that re-routes in the same network are fast. However, it is always a good idea to measure the delays yourself.

share|improve this answer
add comment

If you're using ProxyPass it's not routing it's proxying. So in the worst case scenario you have the overhead of setting up two additional TCP/IP connections and moving content over these connections, i.e.

A says "GET HTTP/1.0..." to B.
B says "GET HTTP/1.0..." to C.
C says "GET HTTP/1.0..." to D.
D says "Answer..." to C.
C says "Answer..." to B.
B says "Answer..." to A.

If it's high volume you're looking for, proxying is probably not a good idea.

Can you not achieve the same thing with redirection (mod_rewrite by rewriting the requests?)

share|improve this answer
    
Hi, not sure rewriting will be possible because I have to direct the request call from one machine to another ( albelt in the same network) –  Graviton Mar 12 '09 at 10:38
    
AFAIK rewriting is possible across absolute URLs (i.e. in between different HTTP servers). –  diciu Mar 12 '09 at 13:52
add comment

just a thought:

is it possible that your apache does reverse dns check for ip that sends the query? [ eg for logging ]? check if you have HostnameLookups directive in your config set to Off.

share|improve this answer
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.