0

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?

  • 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
2

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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