[ https://issues.apache.org/jira/browse/NIFI-10221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Handermann updated NIFI-10221: ------------------------------------ Issue Type: Improvement (was: Bug) > Nifi does not respect multirecord domain in hostname field. > ----------------------------------------------------------- > > Key: NIFI-10221 > URL: https://issues.apache.org/jira/browse/NIFI-10221 > Project: Apache NiFi > Issue Type: Improvement > Affects Versions: 1.16.0 > Reporter: Wiktor Kubicki > Assignee: David Handermann > Priority: Major > > *Short description:* > Using DNS we are able to add multiple A records with several IP addresses to > domain, but Nifi use always only (first?) one. > > *Background:* > We can add multiple A records in DNS to provide round robin "load balancer", > which can also be used as failover server in Active - Active server schema. A > good example of that implementation is there: [How To Configure DNS > Round-Robin Load-Balancing For High-Availability | > DigitalOcean|https://www.digitalocean.com/community/tutorials/how-to-configure-dns-round-robin-load-balancing-for-high-availability]. > We use this solution to provide address to our two sFTP servers in different > geographical locations. > > {*}How it works now{*}: > When i put domain into hostname field in listSFTP, Nifi will solve DNS and > obtain only one address (probably the first one but i cannot comfirm) and > connect to it. But when this one IP is unreachable, NiFi will not try with > second one nor try the second one in any next run. > > *How it should works:* > Addresses should be used randomly (round robin), and if one is unavailable, > then in the same run should be tried another one till end of IP's or > successful connection. > > {*}Example{*}: > Using sftp client (OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017) i can > connect to host by domain, even if one of IP addresses is down: > > {code:java} > $ sftp -vvv -oPort=22 u...@example.com > OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 > debug1: Reading configuration data /XXX/.ssh/config > debug1: Reading configuration data /etc/ssh/ssh_config > debug1: /etc/ssh/ssh_config line 58: Applying options for * > debug2: resolving "example.com" port 22 > debug2: ssh_connect_direct: needpriv 0 > debug1: Connecting to example.com [X.X.X.203] port 22. > debug1: connect to address X.X.X.203 port 22: Connection refused > debug1: Connecting to example.com [Y.Y.Y.123] port 22. > debug1: Connection established.{code} > As you can see, sftp tries to connect to first, when connections refused then > it try to second one with success. And that's how it should work in NiFi > -- This message was sent by Atlassian Jira (v8.20.10#820010)