[
https://issues.apache.org/jira/browse/CASSANDRA-21539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101478#comment-18101478
]
Stefan Miklosovic edited comment on CASSANDRA-21539 at 8/3/26 7:20 PM:
-----------------------------------------------------------------------
I see this comment on GitHub from [~aweisberg] (1).
We could also potentially cache it, having a cache of 100 client IPs . But that
would bring more problems - it would be a cache _per node_ so querying that
table on a different node would hit DNS again unless it is cached there too.
Then we would possibly want to evict from that cache if number of entries is
bigger than N (configurable?). Also, what happens if that IP is assigned to a
different DNS hostname? If cache is not invalidated then we would report stale
DNS names of a given IP until it is evicted / expired.
I find it to be an overkill to make it configurable. If you configure it
differently on each node, e.g by accident, that will give you different results
etc.
(1) https://github.com/apache/cassandra/pull/4971#issuecomment-5169461475
was (Author: smiklosovic):
I see this comment on GitHub from [~aweisberg] (1).
We could also potentially cache it, having a cache of 100 client IPs . But that
would bring more problems - it would be a cache _per node_ so query that table
on a different node would hit DNS again unless it is cached there too. Then we
would possibly want to evict from that cache if number of entries is bigger
than N (configurable?). Also, what happens if that IP is assigned to a
different DNS hostname? If cache is not invalidated then we would report stale
DNS names of a given IP until it is evicted / expired e
I find it to be an overkill to make it configurable. If you configure it
differently on each node, e.g by accident, that will give you different results
etc.
(1) https://github.com/apache/cassandra/pull/4971#issuecomment-5169461475
> 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: 4.0.x, 4.1.x, 5.0.x, 6.x, 7.x
>
> Attachments: 4.0-ci_summary.html, 4.0-result_details.tar.gz.zip,
> 5.0-ci_summary.html, 5.0-result_details.tar.gz, 6.0-ci_summary.html,
> 6.0-result_details.tar.gz, ci_summary-1.html, ci_summary.html,
> result_details.tar-1.gz, result_details.tar.gz
>
> Time Spent: 40m
> 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: [email protected]
For additional commands, e-mail: [email protected]