[jdev] Sharing a single connection for multiple users

Justin Karneges justin-keyword-jabber.093179 at affinix.com
Wed Feb 27 01:11:46 CST 2008


On Tuesday 26 February 2008 10:51 pm, Andrew Miehs wrote:
> I do not see the issue as a too high load problem.
>
> Let us assume 50,000 users online.
> Most of the users never send any traffic, so they do not actually
> create a load problem.
>
> However, there is a difference between 50K tcp connections to the
> jabber server, versus 50 (1 per server) connections in total.

Sure.  And this is what I was talking about.  For example, if you use 
jabberd/jadc2s, then you set up 50 "edge" servers running jadc2s.  Each edge 
server is capable of handling 1000 client connections, and each connects just 
once to a "master" jabberd.  So the master jabberd only has 50 connections, 
each connection handling 1000 clients worth of traffic.

The protocol between jadc2s and jabberd is internal and specific to that 
combination of software.  From the outside, jadc2s appears like any normal 
XMPP service.  Connecting clients do not know or care about how the overall 
system works internally.

One possibility for you would be to make each web server an "edge" server.  
That is, you run jadc2s on each web server, and the backend of the web client 
simply connects to the web server's own local jadc2s instance (localhost 
connection).  Then each web server maintains just one connection to a single 
backend jabberd.

To be honest I don't know how relevant the jabberd/jadc2s combination is 
anymore.  Ejabberd or Openfire may offer better load-balancing options.  My 
point is simply that this is not really a protocol issue, but a server 
deployment/implementation issue.

-Justin



More information about the JDev mailing list