Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When connecting to an service provided using anycast, I am experiencing different behaviour depending on whether the request is made using TCP or UDP.

With TCP, the request is made to address A, and the subsequent response also comes from A.

With UDP however, while the request is made to A, the response comes from address B.

Is this correct behaviour, or should the UDP response come from the same address it's sent to?

share|improve this question
1  
"Anycast" is more of a concept than one specific implementation. You need to provide a lot more details for us to help you. –  cagenut May 3 '10 at 17:54
    
agreeing with cagenut. –  dbasnett May 3 '10 at 19:01
add comment

1 Answer

up vote 2 down vote accepted

What you're seeing here may be more a factor of OS default source address selection semantics then an anycast issue specifically, although an anycasted setup will expose the problem more quickly.

On systems with multiple IPs (which is almost always the case for anycast uses), outgoing connections will originate from the machine's primary IP. Since TCP uses connections, there's a stronger association between the destination address of an incoming packet and the origin address of the reply; UDP doesn't have this as much.

For your UDP-based anycasted app, you will probably want to look on the server side for a setting to chose the interface to bind to, and possibly an additional setting for the address to use for outgoing connections.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.