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

ASF GitHub Bot commented on KAFKA-6863:
---------------------------------------

edoardocomar opened a new pull request #4987: KAFKA-6863 Kafka clients should 
try to use multiple DNS resolved IP
URL: https://github.com/apache/kafka/pull/4987
 
 
   * Selector uses InetAddress.getAllByName to find all IPs and iterates
   over them when they fail to connect
   * Unit test
   
   Co-authored-by: Edoardo Comar <eco...@uk.ibm.com>
   Co-authored-by: Mickael Maison <mickael.mai...@gmail.com>
   
   On attempting to connect to a resolved IP that does not respond, there 
appears to be a 75 second timeout - this is reflected in the unit test. 
   If the resolved IP refuses the connection the selector would move the next 
IP quickly 
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Kafka clients should try to use multiple DNS resolved IP addresses if the 
> first one fails
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6863
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6863
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>    Affects Versions: 1.0.0, 1.1.0
>            Reporter: Edoardo Comar
>            Assignee: Edoardo Comar
>            Priority: Major
>             Fix For: 2.0.0
>
>
> Currently Kafka clients resolve a symbolic hostname using
>   {{new InetSocketAddress(String hostname, int port)}}
> which only picks one IP address even if the DNS has multiple records for the 
> hostname, as it calls
>  {{InetAddress.getAllByName(host)[0]}}
> For some environments where the hostnames are mapped by the DNS to multiple 
> IPs, e.g. in clouds where the IPs point to the external load balancers, it 
> would be preferable that the client, on failing to connect to one of the IPs, 
> would try the other ones before giving up the connection.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to