httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rigby <>
Subject Re: UNIQUE_ID as an integer
Date Fri, 07 Jan 2005 01:02:52 GMT
Hey Will,
I do indeed think that this patch is useful and I would like to apply
it to my configuration! Alas I am not all that good with the
modification/patching of programs using the source code (I only know
how to program in Visual Basic... which I am hoping to ditch and learn
C++) or the use of linux in general for that matter. Therefore I ask
could you, or anyone else please provide information or a reference to
information regarding how to implement such a patch on linux for
apache. I'm sorry if I'm asking a stupid question but if someone could
push me in the right direction it would be greatly appreciated.

On Wed, 5 Jan 2005 17:15:32 -0800, Will Lowe <> wrote:
> I'm running a site that uses mod_unique_id to generate session IDs
> under Apache 1.3.  We'd like to later be able to use the session IDs
> as database keys, but at our volume (a hundred million sessions per
> day) using non-numerics as keys makes databases painfully slow.  We
> tried a scheme where we mapped each UNIQUE_ID to a sequental numeric
> key, but then key generation and lookup became the bottleneck.
> I put together a patch that modifies mod_unique_id to encode the ID as
> a hex string and stick it in a UNIQUE_HEX_ID environment variable.
> This has the benefit of being directly importable into a numeric field
> (128bit if you don't HAVE_MULTITHREAD) in most databases.
> In case there's some interest in this in the community, the patch is
> here:
> ap_snprintf() doesn't understand the "%hhx" format.  Linux's
> snprintf() does, but it looks like Solaris 5.8 doesn't.  Is there a
> more portable way to do this?
> --
>                                         thanks,
>                                         Will

     `6_ 6  )   `-.  (     ).`-.__.`)
     (_Y_.)'  ._   )  `._ `. ``-..-'
   _..`--'_..-_/  /--'_.' ,'
  (il),-''  (li),'  ((!.-' 

Go to this site and make moneys for nothing:

View raw message