In the case of not using vnodes, sorting by token would be ideal.

Chris

On Fri, Dec 13, 2024 at 6:52 AM Štefan Miklošovič <smikloso...@apache.org>
wrote:

> I want to add that I slightly prefer ordering by ID because for cases when
> a cluster is deployed in a cloud environment, IP addresses assigned to
> nodes are basically random so their sorting does not give any meaningful
> advantage. In that case, sorting by ID would just order them by their
> "age".
>
> On Fri, Dec 13, 2024 at 1:41 PM Štefan Miklošovič <smikloso...@apache.org>
> wrote:
>
>> Hello,
>>
>> I am reviewing a patch which enables sorting of nodetool's output (in
>> ascending and descending direction) for every column. The rationale behind
>> it is in (2).
>>
>> My question is, what should we sort by default? The patch does not impose
>> any sorting, by default, it will be just as it is now.
>>
>> I think that it would be nice if the output is sorted already in some
>> manner. The most obvious candidates are either ip (ip address or hostnames)
>> or id (uuid).
>>
>> What is nice about sorting by ID is that I think that TCM introduced
>> somewhat predictable node ids where every new node has ID increased by 1.
>> So, default sorting by ID in ascending direction would give us the oldest
>> node in a cluster as the first one in the output.
>>
>> On the other hand, sorting by IP addresses would give us nodes with
>> lexicographically "lowest ip" as first. These also happen to be the oldest
>> / first deployed.
>>
>> What preference do you have in this matter?
>>
>> Thanks
>>
>> (1)
>> https://github.com/instaclustr/cassandra/commit/e952524f6becc9f047769a886004b8c1bf5c256d
>> (2) https://issues.apache.org/jira/browse/CASSANDRA-20104
>>
>

Reply via email to