Bug 785195 - Client connection to Domain Name with multiple IP addresses by round robin does not work effectively
Summary: Client connection to Domain Name with multiple IP addresses by round robin do...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Andrew Stitcher
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks: 802466
TreeView+ depends on / blocked
 
Reported: 2012-01-27 15:30 UTC by Zdenek Kraus
Modified: 2020-05-22 14:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-22 14:35:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zdenek Kraus 2012-01-27 15:30:21 UTC
Description of problem:
When for one Domain name is returned more IP address records and they are unavailable, client should try all results by round robin mechanism.

But it is N-Round robin, that is trying n-times one IP and has a exponential backoff with t_n = 3 * 2^n time complexity. With N=6 as the client attemps 6 times, the whole time for one IP is SUM(3*2^n) for n=0..5 so 186s.

NOTE: this is problem not only of qpid-cpp, but python also

Version-Release number of selected component (if applicable):
python-qpid-0.14-1.el5
qpid-java-example-0.14-1.el5
qpid-cpp-client-0.14-3.el5
qpid-jca-0.14-4.el5
qpid-java-client-0.14-1.el5
qpid-jca-xarecovery-0.14-4.el5
qpid-qmf-debuginfo-0.14-2.el5
qpid-cpp-mrg-debuginfo-0.14-3.el5
qpid-cpp-client-ssl-0.14-3.el5
qpid-cpp-client-devel-0.14-3.el5
qpid-qmf-devel-0.14-2.el5
qpid-java-common-0.14-1.el5
qpid-cpp-client-devel-docs-0.14-3.el5
qpid-tools-0.14-1.el5

How reproducible:
100%

Steps to Reproduce:
1. prepare some ip addresses with ip address add <ip>/<mask> dev <interface>
2. prepare DNS for that ip addresses and some domain name
3. check DNS response by dig ANY <domainname> +short
4. clear both IPv4 and IPv6 iptables by iptables -F and ip6tables -F
5. block all ip addresses except last in DNS response by:
iptables -A INPUT -p tcp --source <ip> -j REJECT
iptables -A INPUT -p tcp --destination <ip> -j REJECT
for ipv6 use ip6tables
6. start broker
7. start tcpdump -n -i lo tcp port <brokerport>
8. start client with domain name to broker example qpid-perftest --count 1 -b <domainname>
9. examine delays and how the IPs are tried
  
Actual results:
N-Round Robin with exponential backoff that 6times tries one IP tables with delay 186s, and then go for next

Expected results:
Round Robin with exponential backoff, that tries all addresses sequentially with first delay (3s), then again tries all addresses with increased backoff, ...

Additional info:


Note You need to log in before you can comment on or make changes to this bug.