Gallery on Balanced 4 node cluster. Login Persistence?
|
jaylakes
Joined: 2005-08-03
Posts: 4 |
Posted: Wed, 2005-08-03 18:25
|
|
I've got a question regarding login to the gallery for the purposes of posting. The reason I'm posting this here is because this is not a setup I've seen discussed anywhere and this seemed the closest to topic. My setup is as follows: Single Slackware 9.1 system on the frontend running IPVSADM for load balancing between 4 backend balanced apache 1.3.33 web servers with PHP 4.3.10 using Gallery 1.5. with the content directory for the apache web servers located on a failover NFS share behind the web servers running Linuc kernel 2.4.29. Gallery has been configured within the NFS mounted document root with the gallery temp directory located on the same NFS mounted filesystem. The intended purpose was to have a login session persist regardless of which web server in the load balanced 4 was hit. This setup doesn't seem to be working in spite of this. I would prefer not to modify the hardware configuration simply because of the desired redundancy. the NFS server is a failover cluster with a hot standby slave. How exactly is Gallery tracking user login sessions such that I could possibly make the session persist? I'm aware that this configuration is probably far from typical, but any help would be appreciated. Network layout follows. Load Balanceing server in frontend with 192.168.190.x |
|
| Login or register to post comments |

Posts: 43
Isn't that a little overkill just for gallery? =P
Posts: 4
Personally? Yes..yes it is. But this is a test bed for clustering methods on Linux platforms. It's also not mine. It belongs to my future father-in-law. ;-)
Posts: 4
In case anyone is interested in how this was done,
the change was a simple one.
On each of the 4 web nodes, the php.ini file was modified to place the php session files in the same directory as the gallery tmp (right in the NFS mounted content directory). This allows login sessions to persist regardless of the web server serving the request.
The root problem that this addresses is that when gallery is load balanced, if you logged in, the logged in status was lost if you hit the other web server, making photo uploading impossible unless you disable all but one of the servers on the load balancer. Placing the php session data in an NFS mounted docroot that all web nodes share presents the same session data to all of the servers. I was initially under the impression that the session data was stored in the gallery temp directory, but after doing a little more research I found that the PHP session data was what was missing on the other nodes. By default, the php session data was being stored in a directory not on the NFS mount making the data unavailable to the rest of the nodes. With this minor correction, the problem was resolved.
NOTE: I do not claim that gallery is in any way CPU intense. This configuration was purely for test purposes to see if it could be effectively done. After testing was completed, it was determined that a more ideal configuration was to replace IPVSADM with Apache running mod_proxy. In this configuration, any CPU intensive sites could be placed on the 4 node load balanced cluster while the gallery could be placed on the single reverse proxy balancer.
Of course if the purpose of your site configuration is to show just how insanely geeky you can be, then this is how you make it work ;-)
Posts: 31958
Gallery does not use php's session extension (it does not use session.save_path) for its own sessions.
unless in the installer / upgrader, there we use php's session extension.
so as long as all webservers access the same g2data (g2data/sessions) directory, there's no problem concerning session persistence.
we plan to move sessions into the database, so this will soon not be required anymore.
Posts: 76
What is the kind of load you are expecting for such an arranagement? Just out of curiosity!
I hope this thread doesnt get killed by all the spams!
______________________________________________________
Cheap Dedicated Server Review - Cheap Shared Hosting Review
Posts: 1
Valiant, what version of php interpretator used?
MP3Budda
Posts: 7
I've used slackware in the past (3 yrs. ago or so). Either I'm getting lazy in my old age, don't have enought time or just spoiled by distros with easy hardware setup. I just don't see the point of struggling to get sound cards, printers, X settings correct or whatever wireless or USB hardware you may have working.
That's why I like Knoppix so much. Just plug it in and go.
On the desktop, I want something easy. On the server, I don't mind spending some time. That's why lately I've been using FreeBSD on the server and Windows on the desktop.
---
Posts: 1
Why php interpritator need to use?
Program good work and do all tasks I think.
________
buy movies online
Posts: 2
Good program! I like Knoppix very much.
---------------------------------------
New diet - lemon detox diet
Posts: 1
PHP interpritator work really good! That's why I like Knoppix so much. Just plug it in and go.
___________________________________________
Do YOU know - wii remote charger
Posts: 2
The programm dos not work, help!!!
__________
New diet - lemon detox
Posts: 6158
Hello alfa80,
can you give more details to your statement?
Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6
Posts: 1
Very inportant information... but i agree with Tim_j .. please give more details to your statement?
______________________________________________
movie download
Posts: 5
Program work really good! Thank you!
best mp3 downloads
Posts: 5
Thanks for good program!
mp3 music download
Posts: 5
Very inportant information... but i agree with Tim_j..
mp3 music download
Posts: 5
Hello! Well done..
cheap online car insurance quote
Posts: 5
Isn't that a little overkill just for gallery?
mp3 music