Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <tanxi...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <dev@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on 
> https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C0e82ba702c3f4f33d87108dcac61da79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638574783738380055%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=9TNkrTQlrQZHqhx%2B%2BxJslUQVALiZEzyAx%2BROPepFkmE%3D&reserved=0<https://github.com/apache/iotdb/pull/12914>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the 
> dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each 
> node with an address of 0.0.0.0. So, if someone wants to remove a data-node 
> by its IP, the cli will not find the corresponding node as it thinks it’s 
> 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all 
> nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his 
> dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are 
> getting the request is being used (Obviously this one exists and belongs to 
> the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of 
> the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of 
> the “show datanodes” command, because it could be in a cluster-internal 
> network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to 
> connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to 
> connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip 
> address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace 
> this with the list of public IP addresses the data-node possesses. In this 
> case show data-nodes would no longer display only one IP-Address, but a list 
> of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now 
> identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

Reply via email to