[erlang-questions] Force re-resolve of DNS
Geoff Cant
nem@REDACTED
Tue Feb 24 20:00:48 CET 2015
Looks like {cache_size, 0}. might be an option too.
That said, ELBs don't change their IPs all that often. It takes ~10mins for scale events to happen (increase in requests before the ELB adds more nodes), so I wouldn't worry too much about getting dns results to expire every minute. I think it's more important that after resolving, if you connect and get some kind of error (connection refused, or an invalid ssl cert, or some other response that shouldn't be possible from your ELB) that your client re-resolves DNS before reconnecting. (i.e. the failure you're protecting against is a stale DNS result that's leading you to someone else's ELB)
Cheers,
-G
> On 2015-02-24, at 08:26 , Roberto Ostinelli <roberto@REDACTED> wrote:
>
> I'm considering using the {cache_refresh, Time}. of inet_cfg:
> http://www.erlang.org/doc/apps/erts/inet_cfg.html
>
> Wouldn't this be a valid option?
>
> Best,
> r.
>
> On Tue, Feb 24, 2015 at 4:52 PM, Roberto Ostinelli <roberto@REDACTED> wrote:
> Dear List,
> I'm currently testing a system behind Amazon's ELB.
>
> From their documentation:
>
> "If clients do not re-resolve the DNS at least once per minute, then the new resources Elastic Load Balancing adds to DNS will not be used by clients. This can mean that clients continue to overwhelm a small portion of the allocated Elastic Load Balancing resources, while overall Elastic Load Balancing is not being heavily utilized".
>
> I therefore need to ensure my clients re-resolve the DNS every minute or so. Is there a way to do so? I couldn't find anything in inet_res.
>
> Thank you,
> r.
More information about the erlang-questions
mailing list