Two switches means 4 combinations, which will bring more complexity, more
test cases,
and it will be difficult for users to understand. such as:
1. What should I do if `dns_resolver` is empty and `enable_local_dns` is
false?
2. What should I do if `dns_resolver` is not empty and `enable_local_dns`
is true?

To be honest, I don't know how to deal with the above two situations.

A design that doesn't need to be explained to the user is a good design.

Thanks,
Ming Wen, Apache APISIX & Apache SkyWalking
Twitter: _WenMing


YuanSheng Wang <membp...@apache.org> 于2020年3月25日周三 下午9:42写道:

> @Ming
>
>
> "When the dns_resolver in config.yaml is not set any IP, then it will read
> the local resolv.conf. This is equivalent to a hidden switch." [1]
>
> I don't like this hidden switch.
>
> We should allow users to enable or disable local `/etc/resolv.conf`
> independently.
>
> It's easier to understand.
>
> [1]
> https://github.com/apache/incubator-apisix/pull/1217#issuecomment-598500231
>
>
> On Wed, Mar 25, 2020 at 9:17 PM YuanSheng Wang <membp...@apache.org>
> wrote:
>
> > Hi
> >
> > Here is the github PR[1]
> >
> > what is your opinion about this?
> >
> >
> > [1]
> >
> https://github.com/apache/incubator-apisix/pull/1217#discussion_r397817423
> >
> >
> >
> > --
> > *MembPhis*
> > My github: https://github.com/membphis
> > Apache APISIX: https://github.com/apache/incubator-apisix
> >
>
>
> --
> *MembPhis*
> My github: https://github.com/membphis
> Apache APISIX: https://github.com/apache/incubator-apisix
>

Reply via email to