[JDEV] UDP vs TCP

mark at mjwilcox.com mark at mjwilcox.com
Thu Aug 31 20:19:35 CDT 2000


TCP can scale very well, thank you very much. In particular once 
we start using select and asynch IO on the socket level (which I 
think jabberd, the next version of Jabber does & it's coming out 
soon), this will enable a single server to handle an enormous 
amount of connections.

If that's not enough, jabberd will be able to be server farmed.

UDP gets its performance boost because it doesn't care if its 
packets get there or not. While there are indeed applications where 
this is ok for example streaming video (where if you miss a packet, 
in particular during a live event, there's no point in retrying to get it 
becuase that particular moment in time that the packet contained 
has passed) a local configuration system where the network 
connection is reliable.

IM doesn't fall into either one of those categories. You do need to 
make sure that all of the packets got there and in the proper order. 
While you could indeed add this capability to your IM application, 
in the end, you'll just end up re-implementing TCP and probably 
poorly.

Also there's no gurantee of the sequence of packets sent via UDP, 
you have a very hard time implementing standard security 
mechanisms such as SSL.

That's why most people stick to TCP instead of UDP. If UDP 
provided more bang for the buck, it would be used. But it doesn't 
so, we stick with TCP.

I"m not saying you shouldn't try your system. It might be useful for 
local IM where the network is a lot more reliable than over the 
general Internet.

Mark

On 30 Aug 00, at 11:02, donaldp at mad.scientist.com wrote:

> Don't take this the wrong way but the underlying
> communication layer (TCP) will *never* scale aswell as other
> IM architectures. I plan to write a UDP server at the end of
> the year to try and combat this at the end of the year. Not
> sure how successful I will be thou :P. I will post here if
> it works
> 
> Cheers,
> 
> Pete
> 
> *--------------------------------------------------*
> | Latrobe University,     | Does the name 'Pavlov' |
> | Bundoora, Australia     |    ring a bell ?       |
> *--------------------------------------------------*
> 
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
> 


Mark Wilcox
mark at mjwilcox.com
Got LDAP?




More information about the JDev mailing list