Bug 57119 - Suppress address reuse / DNS cache in mod_proxy
Summary: Suppress address reuse / DNS cache in mod_proxy
Status: REOPENED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.7
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-20 09:01 UTC by Broisy
Modified: 2014-10-23 07:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Broisy 2014-10-20 09:01:41 UTC
Hello everybody,

I am using Apache as a reverse proxy to access an application on a server. The application is replicate on two servers. There is a dns-resolver which supplies the ip address of only one of the server depending on which one is running at the moment of DNS name resolving. So when one server is shutting down, the reverse proxy must automatically switch to the second server.
When I shut down one server, Apache doesn't switch to the second server.
But when I restart Apache, it  switches to the second server and it works perfectly.
I think the reverse proxy doesn't update its IP addresses cache.

Has anyone of you ever had a similiar problem of chached DNS-resolved IP
addresses? Have you found any satisfactory solution? Any additional clues
for me? Any help would be greatly welcome.

Regards 
Broisy
Comment 1 Eric Covener 2014-10-20 12:52:50 UTC
This reads like an email/question rather than a bug report. 

Instead of closing it, I've changed it to an enhancement to either lookup DNS for each new backend connection or to periodically do the same.
Comment 2 Ruediger Pluem 2014-10-20 13:39:24 UTC
It does cache it for performance reasons. Have you thought about using mod_proxy_balancer instead of changing the DNS entry? Otherwise you can use the disablereuse option (http://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypass) with ProxyPass.
Comment 3 Broisy 2014-10-23 07:38:19 UTC
Because of my network architecture, I am obliged to use a DNS Server, so I can't use mod_proxy_balancer.
I will try to use the disablereuse option.
I have seen another solution that consist in changing TTL and SMAX values.
Thanks for your answers