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
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.
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.
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