[JDEV] Scaling 1.4.2 with xdb_file... And the patch

Mike Prince mike at mikeprince.com
Thu Feb 27 14:59:50 CST 2003


I solved my own problem.  I added support for directory fanout below the
spool directory (isn't open source wonderful).

I've included the patched xdb_file for those stuck in 1.4.2 land and are
so inclined.  To use the patch just drop in it and compile.  It WILL NOT
reorg your existing file store (you'll have to write a script to move
the files around).  The new directory is arranged as
./spool/hostname/m/me/mike.xml where the first fanout directory under
hostname is the first character of the username, and the second fanout
directory is the first and the last characters of the username.  Pretty
simple.

Thanks,

Mike

> -----Original Message-----
> From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On 
> Behalf Of Mike Prince
> Sent: Thursday, February 27, 2003 10:11 AM
> To: jdev at jabber.org
> Subject: [JDEV] Scaling 1.4.2 with xdb_file
> 
> 
> I'm scaling up my service (running on JabberD 1.4.2 of course 
> ;) and am running into the expected xdb scaling problems.  
> Further complicating the issue is that I'm using extended 
> namespaces in my XMPP.  I'd like to prove my service can 
> handle 250K accounts.
> 
> The desired solution should be quick to implement (hours to 
> days vs. days to weeks).  Note that I fully expect to move 
> over to an SQL solution in the long term.
> 
> After looking at both xdb_file and xdb_sql, I believe a quick 
> hack at xdb_file is the answer.  Currently xdb_file puts all 
> the user XML files in a single directory.  I'd increase the 
> fan out of the directory, changing ./spool/localhost/mike.xml 
> to ./spool/localhost/m/mi/mike.xml
> 
> Has anyone already done this?  Is there a better path?
> 
> Thanks,
> 
> Mike
> 
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdb_file.c
Type: application/octet-stream
Size: 11298 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20030227/72b48868/attachment-0002.obj>


More information about the JDev mailing list