ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
back «  1  2 

Re: Session clustering, who is online and replication lag

Ok, so it seems there is no way to hook into the garbage collection of memcache, in order to clean out the entry in the database. This is a pitty, as it now means I do need to manage this inside the database, while I hoped I could rely on memcache for this, where I will need to write to anyways when ever I change data inside the session. Doing this update every X minutes makes sense in that case.

I am not yet decided on what table type to use on the MySQL slaves. If I were to use MyISAM, I would get instantaneous COUNT(*) and I would save some memory I could rather allocate to memcache. A HEAP table would generally be all around faster for the writes, though since the table will only consist of fixed length columns, even updates should be decently fast with MyISAM. Anyways, this should be easy to test out later.

@Ivo/Robin: The way you describe the Zend session cluster it seems to make most sense if you do DNS based load balancing, where you expect the user to hit the same server for a number of requests. Having a simple switch to either use memory or disc storage is also nice. But I do not see how this is any better than memcache if you are not DNS load balancing.

Re: Session clustering, who is online and replication lag

There's always so much talk about memcache, and sure it can fix some problems, but why don't we hear more about MCache?

http://www.mohawksoft.org/?q=node/8

MCache has a PHP session handler and an API for ... well, caching.

Re: Session clustering, who is online and replication lag

Accept replication lag if it comes to users/online ;)

Combine Memcache with SQL was already a good idea, but keep that synced is not nice i guess.

Re: Session clustering, who is online and replication lag

A computer cluster is a group of linked computers, working together closely so that in many respects they form a single computer. The components of a cluster are commonly, but not always, connected to each other through fast local area networks. Clusters are usually deployed to improve performance and/or availability over that of a single computer, <a href="http://www.thebizvault.co.uk">work from home</a>, while typically being much more cost-effective than single computers of comparable speed or availability.

«  1  2