Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread mike
On 2/14/08, Richard Lynch <[EMAIL PROTECTED]> wrote: > There is some kinda signal you can send to Apache to GRACEFULLY die out. > > New connections are refused, but old ones are finished and then the > child exits. > > http://apache.org/ > > There is a "graceful" restart for sure. Perhaps it's ju

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 3:07 pm, mike wrote: > actually right now i have an issue on my system i'm working on > resolving - and it does create some poor experience for users. when > one of my webservers is taken out of the pool (softly due to a > healthcheck failure, not via reboot) those clients

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 1:30 pm, mike wrote: > On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: >> Make sure all requests from the same client go to the same server. >> This >> is often done by IP-address. > > isn't that an archaic piece of advice? It can "help" reduce the amount of cross-serve

Re: [PHP] Session and Multi Server Architecture

2008-02-14 Thread Richard Lynch
On Mon, February 11, 2008 1:53 pm, Per Jessen wrote: > Paul Scott wrote: > >> Either that or in a db, but if you are already in clustering, you >> probably have a memcached instance already right? > > Am I right in thinking that memcached will replicate session > information > across a cluster, and

Re: [PHP] Session and Multi Server Architecture

2008-02-13 Thread Michael McGlothlin
Write a custom session handler which: a) binhex the session data, and if it is less then 4K, put the actual session data into a Cookie on the user's computer. Then their session data travels with them. b) If it's MORE than 4K, put it into memcache (or is it memcached?) on an external box, whi

Re: [PHP] Session and Multi Server Architecture

2008-02-13 Thread Richard Lynch
On Mon, February 11, 2008 11:33 am, chetan rane wrote: > Can any one tell me what will be the best way to maintain session > information on a Multi Server Architecture i.e a Web Cluster. Write a custom session handler which: a) binhex the session data, and if it is less then 4K, put the actual s

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread mike
On 2/12/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > also, in terms of scalability, isnt facebook proof that > memcache can scale? memcached is behind facebook, livejournal (who made it), i believe dealnews, flickr, twitter, pownce, typepad, fotolog, slashdot, feedburner, 37signals, i think even

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Nathan Nobbe
well guys, im reading all this stuff about LVS and so forth, and i must admit, i really dont know the first thing about it. i mean, i do understand the vserver concept, is LVS essentially the same as v-server, http://linux-vserver.org/Welcome_to_Linux-VServer.org ? also, i dont understand how LVS

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Sancar Saran
On Tuesday 12 February 2008 16:06:04 Stut wrote: > Sancar Saran wrote: > > Hello > > > > On Tuesday 12 February 2008 13:39:19 Stut wrote: > >> I'll be using memcache as a simple cache. I hate sessions and avoid them > >> for anything but the most trivial sites. The main sites I work with no > >> lo

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Stut
Per Jessen wrote: Stut wrote: There's no question of locking users to particular machines, nor of uneven distribution. LVS will distribute evenly or according to weights. Indeed, but you must see that making the decision of which server to use per request will result in a more even distributi

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Per Jessen
Stut wrote: >> There's no question of locking users to particular machines, nor of >> uneven distribution. LVS will distribute evenly or according to >> weights. > > Indeed, but you must see that making the decision of which server to > use per request will result in a more even distribution tha

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Stut
Sancar Saran wrote: Hello On Tuesday 12 February 2008 13:39:19 Stut wrote: I'll be using memcache as a simple cache. I hate sessions and avoid them for anything but the most trivial sites. The main sites I work with no longer use sessions because they add a pointless layer of complexity to any a

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Stut
Per Jessen wrote: Stut wrote: Of course, processing power, network capacity and memory are all very cheap these days, so it's easy to put on the Microsoft hat and be wasteful. In my mind you're exchanging traffic over a local network (probably 1Gbps) for a less resilient load balancing system.

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Per Jessen
Stut wrote: >> Of course, processing power, network capacity and memory are all very >> cheap these days, so it's easy to put on the Microsoft hat and be >> wasteful. > > In my mind you're exchanging traffic over a local network (probably > 1Gbps) for a less resilient load balancing system. By lo

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Sancar Saran
Hello For poor man's multinode, ADODB offers Sql based sessions, it was good enough for starters. Of course memcached based session storage was an option. But with this model need better implementation. Memcached was just cache, there was no offical way to backup data. (as far as I know) Reg

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Sancar Saran
Hello On Tuesday 12 February 2008 13:39:19 Stut wrote: > > I'll be using memcache as a simple cache. I hate sessions and avoid them > for anything but the most trivial sites. The main sites I work with no > longer use sessions because they add a pointless layer of complexity to > any application th

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Sancar Saran
On Tuesday 12 February 2008 00:45:59 Michael McGlothlin wrote: > > implement session_set_save_handler() with a database, or > > ideally, memcache. > > I use memcache with a secondary db backing. Works pretty well. I use it > for session data as well as any other uses I want to make of memcache. > M

Re: [PHP] Session and Multi Server Architecture

2008-02-12 Thread Stut
Per Jessen wrote: Stut wrote: Per Jessen wrote: mike wrote: Check out persistency in LVS for instance: http://www.linuxvirtualserver.org/docs/persistence.html i know persistence handling is an option in LVS, but i haven't seen the need to use it. i use LVS right now without even bothering w

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
Stut wrote: > Per Jessen wrote: >> mike wrote: >> Check out persistency in LVS for instance: http://www.linuxvirtualserver.org/docs/persistence.html >>> i know persistence handling is an option in LVS, but i haven't seen >>> the need to use it. i use LVS right now without even bothering

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
mike wrote: > On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: >> Because you've chosen another option - memcached presumably - which >> is more expensive over all. (IMHO). > > mysql (stated above), and i already have a connection open each > page... Ah, so all you need is per-connection persi

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread mike
On 2/11/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > when i was in dc at the conference last year, there were several speakers > from facebook. they claimed they have (had) 400 servers w/ 4TB of memory > at on the memcache tier. actually, it's ~ 400 according to this (200 active / 200 hot spare

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Michael McGlothlin
implement session_set_save_handler() with a database, or ideally, memcache. I use memcache with a secondary db backing. Works pretty well. I use it for session data as well as any other uses I want to make of memcache. Memcache makes it fast and using the db makes it more persistent and able

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Nathan Nobbe
On Feb 11, 2008 4:55 PM, Stut <[EMAIL PROTECTED]> wrote: > Per Jessen wrote: > > On the next request, LVS will know not to try that server, and the user > > will move to another one. Obviously the session-context will die, but > > is that really a big deal? How often does one of your servers die

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Stut
Per Jessen wrote: mike wrote: Check out persistency in LVS for instance: http://www.linuxvirtualserver.org/docs/persistence.html i know persistence handling is an option in LVS, but i haven't seen the need to use it. i use LVS right now without even bothering with any of that. Because you've

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread mike
On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: > Because you've chosen another option - memcached presumably - which is > more expensive over all. (IMHO). mysql (stated above), and i already have a connection open each page... > On the next request, LVS will know not to try that server, and t

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
mike wrote: >> Check out persistency in LVS for instance: >> http://www.linuxvirtualserver.org/docs/persistence.html > > i know persistence handling is an option in LVS, but i haven't seen > the need to use it. i use LVS right now without even bothering with > any of that. Because you've chosen

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread mike
On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: > mike wrote: > > I hope not. I've worked with this type of load-distribution since the > early 90s. (far from always IP-address based). > > Check out persistency in LVS for instance: > http://www.linuxvirtualserver.org/docs/persistence.html i kn

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
Paul Scott wrote: > Either that or in a db, but if you are already in clustering, you > probably have a memcached instance already right? Am I right in thinking that memcached will replicate session information across a cluster, and that your application is only safe as long as you stick _all_ se

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
mike wrote: > On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: >> Make sure all requests from the same client go to the same server. >> This is often done by IP-address. > > isn't that an archaic piece of advice? I hope not. I've worked with this type of load-distribution since the early 90s.

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread mike
On 2/11/08, Per Jessen <[EMAIL PROTECTED]> wrote: > Make sure all requests from the same client go to the same server. This > is often done by IP-address. isn't that an archaic piece of advice? with shared storage and database/memcache for sessions, i don't find this is necessary at all. in fact

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Per Jessen
chetan rane wrote: > HI All > > Can any one tell me what will be the best way to maintain session > information on a Multi Server Architecture i.e a Web Cluster. Make sure all requests from the same client go to the same server. This is often done by IP-address. /Per Jessen, Zürich -- PHP G

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Paul Scott
On Mon, 2008-02-11 at 12:48 -0500, Nathan Nobbe wrote: > http://us.php.net/manual/en/ref.memcache.php > and http://www.danga.com/memcached/ --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Maili

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Nathan Nobbe
On Feb 11, 2008 12:47 PM, chetan rane <[EMAIL PROTECTED]> wrote: > Hi all > can you please let me know where i can find about Mem cache. http://us.php.net/manual/en/ref.memcache.php -nathan

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread chetan rane
Hi all can you please let me know where i can find about Mem cache. On Feb 11, 2008 11:11 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Feb 11, 2008 12:33 PM, chetan rane <[EMAIL PROTECTED]> wrote: > > > HI All > > > > Can any one tell me what will be the best way to maintain session > > info

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Nathan Nobbe
On Feb 11, 2008 12:33 PM, chetan rane <[EMAIL PROTECTED]> wrote: > HI All > > Can any one tell me what will be the best way to maintain session > information on a Multi Server Architecture i.e a Web Cluster. implement session_set_save_handler() with a database, or ideally, memcache. -nathan

Re: [PHP] Session and Multi Server Architecture

2008-02-11 Thread Paul Scott
On Mon, 2008-02-11 at 23:03 +0530, chetan rane wrote: > Can any one tell me what will be the best way to maintain session > information on a Multi Server Architecture i.e a Web Cluster. Memcached session handler. Provides failover as well as speeding things up significantly. Either that or in a

[PHP] Session and Multi Server Architecture

2008-02-11 Thread chetan rane
HI All Can any one tell me what will be the best way to maintain session information on a Multi Server Architecture i.e a Web Cluster. -- Have A pleasant Day Chetan. D. Rane Location: India Contact: +91-9986057255 other ID: [EMAIL PROTECTED] [EMAIL PROTECTED]