[imp] Can Horde sessions use a different database than horde_prefs?

Jeff Tucker jeff at jltnet.com
Mon Feb 24 15:43:41 PST 2003


Hello. This question is fairly specific to my installation, but it's not 
that uncommon so I wonder if someone has figured this out.

I have Horde and imp on three machines behind a load-balancer. In order to 
do the load-balancing, I had to switch from file-based sessions to 
sql-based sessions. I found this was very easy to do in Horde's conf.php as 
I'm already using MySQL for preferences and Turba. This works great and 
users can hit any of the machines without any problem.

In my system, I replicate the MySQL database from a master to multiple 
read-only secondaries. This means that I can send read-only queries to the 
secondaries and I have a hot-spare master ready to go if the main database 
server fails. The problem is that MySQL is replicating the session 
information and that is several GB per day. This causes a fair amount of 
network traffic and makes the binary logs generated by MySQL huge, so large 
that they're nearly useless for any kind of backup purposes.

Ideally, I'd prefer not to replicate the session information at all, while 
replicating the rest of the Horde stuff (user preferences, Turba names, 
basically all the tables except horde_sessionhandler). Unfortunately, MySQL 
forces you to do binary logging at the database level and won't let you 
turn off logging (and therefore replication) of a single table. (I'm aware 
that I can tell the clients not to replicate this table which solves the 
bandwidth problem but not the larger binary logs problem.)

So, the question is is there an easy way to get Horde to store session info 
in a separate database which I could set up with just the single 
horde_sessionhandler table? If not, does anyone have any ideas besides just 
implementing my own custom session handler, getting that running in Horde's 
config, and putting that in its own database?

Thanks
Jeff

-- 
Jeff Tucker
jeff at jltnet.com


More information about the imp mailing list