You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2026/07/29 12:17:00 UTC

[jira] [Comment Edited] (CASSANDRA-21539) Querying system_views.clients causes a DNS lookup for each unique connected client address

    [ https://issues.apache.org/jira/browse/CASSANDRA-21539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100054#comment-18100054 ] 

Stefan Miklosovic edited comment on CASSANDRA-21539 at 7/29/26 12:16 PM:
-------------------------------------------------------------------------

Is this safe to do? While it looks innocent, when I tried this locally it stopped to report DNS name and started to report IP addresses, basically. So the row "hostname" might not be hostname anymore and I am not sure under what circumstances we will ever see a proper hostname in that column ever again. 

Clients vtable as the primary key as (address, port) where {{address}} is of type {{inet}}. That will report IP address without translation. {{hostname}} column, in my view, is meant to be DNS-resolved name, not IP, because we will end up with two same values.


was (Author: smiklosovic):
Is this safe to do? While it looks innocent, when I tried this locally it stopped to report DNS name and started to report IP addresses, basically. So the row "hostname" might not be hostname anymore and I am not sure under what circumstances we will ever see a proper hostname in that column ever again.

> Querying system_views.clients causes a DNS lookup for each unique connected client address
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21539
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21539
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Feature/Virtual Tables
>            Reporter: Nivy Kani
>            Assignee: Nivy Kani
>            Priority: Normal
>             Fix For: 7.x
>
>         Attachments: ci_summary.html, result_details.tar.gz
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It looks like queries to the system_views.clients table does a DNS lookup for each unique address: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/virtual/ClientsTable.java#L91 
> Given Java's internal DNS caches, this is really only potentially slow on the first query, but we should avoid doing DNS lookups here as a workflow that queries this table on each node to collect client information could potentially overwhelm DNS this way.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org