How to get the hostname from cypher so I can know which node the session is talking to

Hi Experts,

I am looking for a cypher, apoc or any method to get the hostname to which the current session is talking to.

For example, when I am connecting to a set of node configured in a causal cluster from a python client, I want to know which neo4j node is serving the read or write by retrieving hostname. Is there a way to do this?

Any guidance, comment, input would be appriciated.

Thank you!

I think you can use dbms.listConnections() or SHOW CONNECTIONS that has a clientAddrewss and serverAddress field.

https://neo4j.com/docs/operations-manual/current/monitoring/connection-management/

Thank you @michael_hunger !