You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Xiangdong Huang <sa...@gmail.com> on 2021/08/25 15:14:45 UTC

discuss why we have to replace hostname to ip in the cluster module

Hi,

Today Julian and I discussed some logic of the cluster module.
Both of us feel it strange that we replace the hostname to IP before a
cluster node starts up.
I think it is not a very common way.

hostname sometimes is very very helpful. For example, in K8S
environment, a node's hostname never changes, but its IP may change.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Julian Feinauer <j....@pragmaticminds.de>.
+1 from me (stumbled across this while setup of cluster mode in k8s) i think we could leave the resolution or dns caching to the underlying os.

Julian

Holen Sie sich Outlook für Android<https://aka.ms/ghei36>
________________________________
From: Xiangdong Huang <sa...@gmail.com>
Sent: Friday, August 27, 2021 7:30:22 AM
To: dev <de...@iotdb.apache.org>
Subject: Re: discuss why we have to replace hostname to ip in the cluster module

yes, my viewpoint is the same, hostname or IP has no difference for IoTDB.

The core is, we need to use node identifiers to  distinguish nodes.

Best,

-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院

Houliang Qi <ne...@163.com> 于2021年8月27日周五 下午1:23写道:
>
> Hi, Xiangdong
>
>
> > I do not think we will abandon using IP. Either using IP or hostname depends on users. If they are sure they have a good DNS, they can use DNS; If they like IP or the nodes do not set the DNS, they can use IP. If they like, they can also mix-use the hostname and IP addresses. We do not need to care…..
>
>
> As mentioned above, since users can use either IP or hostname, I don't realize what the focus of this discussion is. I think the focus is on what the user manual is exposed to the user? What are the functions provided? As for the implementation of the code, I think it is OK to use hostname or IP.
>
>
> In the k8s cluster, the hostname of some pods is also changed. If we only replace IP with hostname, it will not make our iotdb run perfectly on k8s. Therefore, I think it is not important to use hostname or IP. The important thing is to realize the function of automatic service maintenance that can be deployed on k8s.
>
>
> Thanks,
> ---------------------------------------
> Houliang Qi
> BONC, Ltd
> On 08/26/2021 18:29,Xiangdong Huang<sa...@gmail.com> wrote:
> Hi,
>
> DNS request is an additional cost in nodes communication.
>
> I do not think we will abandon using IP. Either using IP or hostname
> depends on users.
> If they are sure they have a good DNS, they can use DNS;
> If they like IP or the nodes do not set the DNS, they can use IP.
> If they like, they can also mix-use the hostname and IP addresses. We
> do not need to care.....
>
> We should make the relationship between node IP, node hostname and node identifier be clear.
>
> IMO, node identifier is the only option.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>
> Eric Pai <er...@hotmail.com> 于2021年8月26日周四 下午4:46写道:
>
> Hi, Xiangdong,
>
> Supporting hostname is really a good feature! However, we should consider these cons carefully:
>
> 1. DNS request is an additional cost in nodes communication. In cloud environment, the latency may be as large as hundreds of milliseconds(e.g. across available regions), and local DNS cache is also an issue in some extreme scenarios.
> 2. We should make the relationship between node IP, node hostname and node identifier be clear. A node should not be treated as a new one if it changes its IP or hostname. Or allowing to change IP only.
>
> 在 2021/8/25 下午11:15,“Xiangdong Huang”<sa...@gmail.com> 写入:
>
> Hi,
>
> Today Julian and I discussed some logic of the cluster module.
> Both of us feel it strange that we replace the hostname to IP before a
> cluster node starts up.
> I think it is not a very common way.
>
> hostname sometimes is very very helpful. For example, in K8S
> environment, a node's hostname never changes, but its IP may change.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Xiangdong Huang <sa...@gmail.com>.
yes, my viewpoint is the same, hostname or IP has no difference for IoTDB.

The core is, we need to use node identifiers to  distinguish nodes.

Best,

-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院

Houliang Qi <ne...@163.com> 于2021年8月27日周五 下午1:23写道:
>
> Hi, Xiangdong
>
>
> > I do not think we will abandon using IP. Either using IP or hostname depends on users. If they are sure they have a good DNS, they can use DNS; If they like IP or the nodes do not set the DNS, they can use IP. If they like, they can also mix-use the hostname and IP addresses. We do not need to care…..
>
>
> As mentioned above, since users can use either IP or hostname, I don't realize what the focus of this discussion is. I think the focus is on what the user manual is exposed to the user? What are the functions provided? As for the implementation of the code, I think it is OK to use hostname or IP.
>
>
> In the k8s cluster, the hostname of some pods is also changed. If we only replace IP with hostname, it will not make our iotdb run perfectly on k8s. Therefore, I think it is not important to use hostname or IP. The important thing is to realize the function of automatic service maintenance that can be deployed on k8s.
>
>
> Thanks,
> ---------------------------------------
> Houliang Qi
> BONC, Ltd
> On 08/26/2021 18:29,Xiangdong Huang<sa...@gmail.com> wrote:
> Hi,
>
> DNS request is an additional cost in nodes communication.
>
> I do not think we will abandon using IP. Either using IP or hostname
> depends on users.
> If they are sure they have a good DNS, they can use DNS;
> If they like IP or the nodes do not set the DNS, they can use IP.
> If they like, they can also mix-use the hostname and IP addresses. We
> do not need to care.....
>
> We should make the relationship between node IP, node hostname and node identifier be clear.
>
> IMO, node identifier is the only option.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>
> Eric Pai <er...@hotmail.com> 于2021年8月26日周四 下午4:46写道:
>
> Hi, Xiangdong,
>
> Supporting hostname is really a good feature! However, we should consider these cons carefully:
>
> 1. DNS request is an additional cost in nodes communication. In cloud environment, the latency may be as large as hundreds of milliseconds(e.g. across available regions), and local DNS cache is also an issue in some extreme scenarios.
> 2. We should make the relationship between node IP, node hostname and node identifier be clear. A node should not be treated as a new one if it changes its IP or hostname. Or allowing to change IP only.
>
> 在 2021/8/25 下午11:15,“Xiangdong Huang”<sa...@gmail.com> 写入:
>
> Hi,
>
> Today Julian and I discussed some logic of the cluster module.
> Both of us feel it strange that we replace the hostname to IP before a
> cluster node starts up.
> I think it is not a very common way.
>
> hostname sometimes is very very helpful. For example, in K8S
> environment, a node's hostname never changes, but its IP may change.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
> 黄向东
> 清华大学 软件学院
>

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Houliang Qi <ne...@163.com>.
Hi, Xiangdong


> I do not think we will abandon using IP. Either using IP or hostname depends on users. If they are sure they have a good DNS, they can use DNS; If they like IP or the nodes do not set the DNS, they can use IP. If they like, they can also mix-use the hostname and IP addresses. We do not need to care…..


As mentioned above, since users can use either IP or hostname, I don't realize what the focus of this discussion is. I think the focus is on what the user manual is exposed to the user? What are the functions provided? As for the implementation of the code, I think it is OK to use hostname or IP.


In the k8s cluster, the hostname of some pods is also changed. If we only replace IP with hostname, it will not make our iotdb run perfectly on k8s. Therefore, I think it is not important to use hostname or IP. The important thing is to realize the function of automatic service maintenance that can be deployed on k8s.


Thanks,
---------------------------------------
Houliang Qi
BONC, Ltd
On 08/26/2021 18:29,Xiangdong Huang<sa...@gmail.com> wrote:
Hi,

DNS request is an additional cost in nodes communication.

I do not think we will abandon using IP. Either using IP or hostname
depends on users.
If they are sure they have a good DNS, they can use DNS;
If they like IP or the nodes do not set the DNS, they can use IP.
If they like, they can also mix-use the hostname and IP addresses. We
do not need to care.....

We should make the relationship between node IP, node hostname and node identifier be clear.

IMO, node identifier is the only option.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

黄向东
清华大学 软件学院

Eric Pai <er...@hotmail.com> 于2021年8月26日周四 下午4:46写道:

Hi, Xiangdong,

Supporting hostname is really a good feature! However, we should consider these cons carefully:

1. DNS request is an additional cost in nodes communication. In cloud environment, the latency may be as large as hundreds of milliseconds(e.g. across available regions), and local DNS cache is also an issue in some extreme scenarios.
2. We should make the relationship between node IP, node hostname and node identifier be clear. A node should not be treated as a new one if it changes its IP or hostname. Or allowing to change IP only.

在 2021/8/25 下午11:15,“Xiangdong Huang”<sa...@gmail.com> 写入:

Hi,

Today Julian and I discussed some logic of the cluster module.
Both of us feel it strange that we replace the hostname to IP before a
cluster node starts up.
I think it is not a very common way.

hostname sometimes is very very helpful. For example, in K8S
environment, a node's hostname never changes, but its IP may change.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

黄向东
清华大学 软件学院


Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Xiangdong Huang <sa...@gmail.com>.
Hi,

> DNS request is an additional cost in nodes communication.

I do not think we will abandon using IP. Either using IP or hostname
depends on users.
If they are sure they have a good DNS, they can use DNS;
If they like IP or the nodes do not set the DNS, they can use IP.
If they like, they can also mix-use the hostname and IP addresses. We
do not need to care.....

> We should make the relationship between node IP, node hostname and node identifier be clear.

IMO, node identifier is the only option.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

 黄向东
清华大学 软件学院

Eric Pai <er...@hotmail.com> 于2021年8月26日周四 下午4:46写道:
>
> Hi, Xiangdong,
>
> Supporting hostname is really a good feature! However, we should consider these cons carefully:
>
> 1. DNS request is an additional cost in nodes communication. In cloud environment, the latency may be as large as hundreds of milliseconds(e.g. across available regions), and local DNS cache is also an issue in some extreme scenarios.
> 2. We should make the relationship between node IP, node hostname and node identifier be clear. A node should not be treated as a new one if it changes its IP or hostname. Or allowing to change IP only.
>
> 在 2021/8/25 下午11:15,“Xiangdong Huang”<sa...@gmail.com> 写入:
>
>     Hi,
>
>     Today Julian and I discussed some logic of the cluster module.
>     Both of us feel it strange that we replace the hostname to IP before a
>     cluster node starts up.
>     I think it is not a very common way.
>
>     hostname sometimes is very very helpful. For example, in K8S
>     environment, a node's hostname never changes, but its IP may change.
>
>     Best,
>     -----------------------------------
>     Xiangdong Huang
>     School of Software, Tsinghua University
>
>      黄向东
>     清华大学 软件学院
>

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Eric Pai <er...@hotmail.com>.
Hi, Xiangdong,

Supporting hostname is really a good feature! However, we should consider these cons carefully:

1. DNS request is an additional cost in nodes communication. In cloud environment, the latency may be as large as hundreds of milliseconds(e.g. across available regions), and local DNS cache is also an issue in some extreme scenarios.
2. We should make the relationship between node IP, node hostname and node identifier be clear. A node should not be treated as a new one if it changes its IP or hostname. Or allowing to change IP only. 

在 2021/8/25 下午11:15,“Xiangdong Huang”<sa...@gmail.com> 写入:

    Hi,

    Today Julian and I discussed some logic of the cluster module.
    Both of us feel it strange that we replace the hostname to IP before a
    cluster node starts up.
    I think it is not a very common way.

    hostname sometimes is very very helpful. For example, in K8S
    environment, a node's hostname never changes, but its IP may change.

    Best,
    -----------------------------------
    Xiangdong Huang
    School of Software, Tsinghua University

     黄向东
    清华大学 软件学院


Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Mark Liu <ma...@gmail.com>.
hostname +1

HW-Chao Wang <57...@qq.com.invalid> 于2021年8月26日周四 下午12:12写道:

> hostname +1
>
>
>
> ---Original---
> From: "Jialin Qiao"<qiaojialin@apache.org&gt;
> Date: Thu, Aug 26, 2021 09:34 AM
> To: "dev"<dev@iotdb.apache.org&gt;;
> Subject: Re: discuss why we have to replace hostname to ip in the cluster
> module
>
>
> Hi,
>
> hostname +1
>
> It makes node migration easy.
>
> Thanks,
> —————————————————
> Jialin Qiao
> School of Software, Tsinghua University
>
> 乔嘉林
> 清华大学 软件学院
>
>
> Xiangdong Huang <sainthxd@gmail.com&gt; 于2021年8月25日周三 下午11:15写道:
>
> &gt; Hi,
> &gt;
> &gt; Today Julian and I discussed some logic of the cluster module.
> &gt; Both of us feel it strange that we replace the hostname to IP before a
> &gt; cluster node starts up.
> &gt; I think it is not a very common way.
> &gt;
> &gt; hostname sometimes is very very helpful. For example, in K8S
> &gt; environment, a node's hostname never changes, but its IP may change.
> &gt;
> &gt; Best,
> &gt; -----------------------------------
> &gt; Xiangdong Huang
> &gt; School of Software, Tsinghua University
> &gt;
> &gt;&nbsp; 黄向东
> &gt; 清华大学 软件学院
> &gt;



-- 

Best,
-----------------------------------
Mark Liu

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by HW-Chao Wang <57...@qq.com.INVALID>.
hostname +1



---Original---
From: "Jialin Qiao"<qiaojialin@apache.org&gt;
Date: Thu, Aug 26, 2021 09:34 AM
To: "dev"<dev@iotdb.apache.org&gt;;
Subject: Re: discuss why we have to replace hostname to ip in the cluster module


Hi,

hostname +1

It makes node migration easy.

Thanks,
—————————————————
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院


Xiangdong Huang <sainthxd@gmail.com&gt; 于2021年8月25日周三 下午11:15写道:

&gt; Hi,
&gt;
&gt; Today Julian and I discussed some logic of the cluster module.
&gt; Both of us feel it strange that we replace the hostname to IP before a
&gt; cluster node starts up.
&gt; I think it is not a very common way.
&gt;
&gt; hostname sometimes is very very helpful. For example, in K8S
&gt; environment, a node's hostname never changes, but its IP may change.
&gt;
&gt; Best,
&gt; -----------------------------------
&gt; Xiangdong Huang
&gt; School of Software, Tsinghua University
&gt;
&gt;&nbsp; 黄向东
&gt; 清华大学 软件学院
&gt;

Re: discuss why we have to replace hostname to ip in the cluster module

Posted by 谭新宇 <10...@qq.com.INVALID>.
Hi,

+1 for hostname.

This makes it easier to migrate the data from the failed node and start it at another one.

And I don't think it makes much sense to allow users to intermix hostname and IP in seed_nodes in current implementation.

Best
—————
Xinyu Tan

> 在 2021年8月26日,上午9:34,Jialin Qiao <qi...@apache.org> 写道:
> 
> Hi,
> 
> hostname +1
> 
> It makes node migration easy.
> 
> Thanks,
> —————————————————
> Jialin Qiao
> School of Software, Tsinghua University
> 
> 乔嘉林
> 清华大学 软件学院
> 
> 
> Xiangdong Huang <sa...@gmail.com> 于2021年8月25日周三 下午11:15写道:
> 
>> Hi,
>> 
>> Today Julian and I discussed some logic of the cluster module.
>> Both of us feel it strange that we replace the hostname to IP before a
>> cluster node starts up.
>> I think it is not a very common way.
>> 
>> hostname sometimes is very very helpful. For example, in K8S
>> environment, a node's hostname never changes, but its IP may change.
>> 
>> Best,
>> -----------------------------------
>> Xiangdong Huang
>> School of Software, Tsinghua University
>> 
>> 黄向东
>> 清华大学 软件学院
>> 
> 


Re: discuss why we have to replace hostname to ip in the cluster module

Posted by Jialin Qiao <qi...@apache.org>.
Hi,

hostname +1

It makes node migration easy.

Thanks,
—————————————————
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院


Xiangdong Huang <sa...@gmail.com> 于2021年8月25日周三 下午11:15写道:

> Hi,
>
> Today Julian and I discussed some logic of the cluster module.
> Both of us feel it strange that we replace the hostname to IP before a
> cluster node starts up.
> I think it is not a very common way.
>
> hostname sometimes is very very helpful. For example, in K8S
> environment, a node's hostname never changes, but its IP may change.
>
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
>
>  黄向东
> 清华大学 软件学院
>

回复:discuss why we have to replace hostname to ip in the cluster module

Posted by CloudWise-Luke <28...@qq.com.INVALID>.
hostname +1



CloudWiseluke.miao


&nbsp;




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "dev"                                                                                    <sainthxd@gmail.com&gt;;
发送时间:&nbsp;2021年8月25日(星期三) 晚上11:14
收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;

主题:&nbsp;discuss why we have to replace hostname to ip in the cluster module



Hi,

Today Julian and I discussed some logic of the cluster module.
Both of us feel it strange that we replace the hostname to IP before a
cluster node starts up.
I think it is not a very common way.

hostname sometimes is very very helpful. For example, in K8S
environment, a node's hostname never changes, but its IP may change.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

&nbsp;黄向东
清华大学 软件学院