I need to implement a client server architecture where the server sends the same message to many clients over the internet. I need to send a single message every 5 minutes about. The message won't excede 5KB. I need the solution to scale to a big number of clients connected (50.000-100.000)
I considered a bunch of solutions:
TCP Sockets
UDP Multicast
WCF http duplex service (comet)
I think I have to discard UDP solution because it is a good solution only for clients on the same network and it won't work over the internet. I read somewhere that WCF multicast will cause a bottleneck if I have many clients connected but I can't find anywhere documentation showing performance statistics. Tcp sockets seems to me the solution to chose. What do you think about? Am I correct?
I'm certainly wrong when I say UDP doesn't work on internet... I thought this because I read some articles pointing out that you need properly configured routers in the network to support multicasting... I read of the udp ports multicast range and thought it was meant to be locally. Instead, the range 224.0.0.1 - 239.255.255.255 (Class D address group), can be reached over the internet
Considering that in my case reliability is not a crucial point, the udp multicast is a good choice. The .net framework offers really helpful classes to accomplish this. I can easily start an UdpClient and begin send data on a multicast address with two lines of code. At client side it is really easy to. There is the UdpSingleSourceMulticastClient class that does exactly what I need. For what concernes reliability and security the .net framework has a smart and simple way of handle DoS attacks, DNS Rebinding attacks and Revers tunnel attacks that is described here: http://msdn.microsoft.com/en-us/library/ee707325(v=vs.95).aspx
Unicast (tcp sockets) will work fine for a relatively small amount of traffic such as this, but keep on top of multicasting technology, the situation is changing every year.