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
4 node load balanced web cluster behind Load Balancer with 192.168.5.*
2 node NFS failover cluster using Linux HA with DRBD behind that with 192.168.6.*
IPCop firewall in front of all of it.
Apache servers configured with docroot on /web mounted from 192.168.6.*:/NFS/web as /web on the web servers. Owner on /web 65534.
Apache running as user Nobody group Nogroup. Gallerry running at url http://camp2.gadc.net:8080/gallery with Gallery TempDir set to /web/tmp with same ownership and perms as the docroot. Forgive me if any of this is unclear. I've been researching this for days.

Login or register to post comments
jdingman

Joined: 2003-11-28
Posts: 43
Posted: Thu, 2005-08-04 04:18

Isn't that a little overkill just for gallery? =P

Login or register to post comments
jaylakes

Joined: 2005-08-03
Posts: 4
Posted: Sun, 2005-08-07 16:25

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. ;-)

Login or register to post comments
jaylakes

Joined: 2005-08-03
Posts: 4
Posted: Thu, 2005-12-01 22:57

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 ;-)

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 31958
Posted: Fri, 2005-12-16 21:17

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.

Login or register to post comments
alemcherry

Joined: 2006-07-19
Posts: 76
Posted: Tue, 2007-06-12 15:51

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

Login or register to post comments
dsasser

Joined: 2008-02-01
Posts: 1
Posted: Fri, 2008-02-01 20:36

Valiant, what version of php interpretator used?
MP3Budda

Login or register to post comments
Dinka

Joined: 2007-12-11
Posts: 7
Posted: Mon, 2008-02-11 07:50

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.
---

Login or register to post comments
xeronat

Joined: 2008-03-02
Posts: 1
Posted: Sun, 2008-03-02 13:44

Why php interpritator need to use?
Program good work and do all tasks I think.
________
buy movies online

Login or register to post comments
alfa80

Joined: 2008-03-31
Posts: 2
Posted: Mon, 2008-03-31 10:11

Good program! I like Knoppix very much.
---------------------------------------
New diet - lemon detox diet

Login or register to post comments
dpool

Joined: 2008-04-08
Posts: 1
Posted: Tue, 2008-04-08 11:52

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

Login or register to post comments
alfa80

Joined: 2008-03-31
Posts: 2
Posted: Mon, 2008-04-28 14:53

The programm dos not work, help!!!
__________
New diet - lemon detox

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6158
Posted: Mon, 2008-04-28 14:58

Hello alfa80,

can you give more details to your statement?

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6

Login or register to post comments
Olivi2

Joined: 2008-05-02
Posts: 1
Posted: Fri, 2008-05-02 15:31

Very inportant information... but i agree with Tim_j .. please give more details to your statement?

______________________________________________

movie download

Login or register to post comments
jerryx

Joined: 2008-06-05
Posts: 5
Posted: Thu, 2008-06-05 18:18

Program work really good! Thank you!

best mp3 downloads

Login or register to post comments
jerryx

Joined: 2008-06-05
Posts: 5
Posted: Fri, 2008-06-06 02:58

Thanks for good program!

mp3 music download

Login or register to post comments
jerryx

Joined: 2008-06-05
Posts: 5
Posted: Sun, 2008-06-08 02:07

Very inportant information... but i agree with Tim_j..
mp3 music download

Login or register to post comments
jerryx

Joined: 2008-06-05
Posts: 5
Posted: Tue, 2008-06-10 18:44
Login or register to post comments
jerryx

Joined: 2008-06-05
Posts: 5
Posted: Tue, 2008-06-17 06:00

Isn't that a little overkill just for gallery?

mp3 music

Login or register to post comments