AMP
Jan 15 2005, 06:46 PM
I have a high traffic site that I want to move to a clustered system, but I depend on PHP sessions. I want to keep the sessions in a distributed file system. What package do you recommend for doing distributed FS on Red Hat Enterprise?
(I tried writing a custom session handler that uses a database, but it didn't perform well enough.)
Thanks,
AMP
alex.davies
Jan 16 2005, 03:02 AM
I seem to remember that you can get sessions saved in mysql. I would then use a mysql cluster to distribute the SQL queries.
Alex
drphp
Jan 28 2005, 05:36 AM
generally, i would first load balance at round robin.. then according to that.. i would limit the user to sit on the server that has been assigned to him.
You can also programatically have load balancers such as write a script to monitor the load on the other server.. and then through session management, send the user to stick to that other server if its a new visitor.
The other alternative altogether is NFS. load the sessions onto a partition on the NFS. this would allow you to keep round robin active.. and even allow the visitor to jump servers.
another alternative is through sql.. since your sql server can be accessed through any of the other webservers, put all the session managfement information into SQL instead. then set a cookie like *.domain.com and mention server1.domain.com server2.domain.com for different servers. then whenever you need any session data, you simply access the SQL instead of session.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.