Large scale website - which concept/design to use?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

wei
Forum Contributor
Posts: 140
Joined: Wed Jul 12, 2006 12:18 am

Re: Large scale website - which concept/design to use?

Post by wei »

The question was not whether memcache scales or how fast memcache is, the question was regarding where session data should be stored. My view is that memcache may not be suitable for this task.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Large scale website - which concept/design to use?

Post by Benjamin »

wei wrote:The question was not whether memcache scales or how fast memcache is, the question was regarding where session data should be stored. My view is that memcache may not be suitable for this task.
I have to disagree. I believe memcache is perfectly suitable for storing session data.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Large scale website - which concept/design to use?

Post by kaisellgren »

A session is more or less a cache.
wei
Forum Contributor
Posts: 140
Joined: Wed Jul 12, 2006 12:18 am

Re: Large scale website - which concept/design to use?

Post by wei »

If the session data may be permitted to be lost, cache may be used, but this is not always the case and usually not the desired behaviour.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Large scale website - which concept/design to use?

Post by Christopher »

When you say "lost" you mean either by a system failure or by a developer set expiration time. The exceeding rare and very controllable. If you want session data to be essentially permanent then DB would be the way to go.
(#10850)
wei
Forum Contributor
Posts: 140
Joined: Wed Jul 12, 2006 12:18 am

Re: Large scale website - which concept/design to use?

Post by wei »

can also be lost when cache becomes full
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Large scale website - which concept/design to use?

Post by kaisellgren »

Huh? Storing sessions in the database means that they stay there until the database has corrupted by either a hardware failure or a software failure unless, of course, someone removed them. I consider this as a "permanent" data storage. If you want a more "permanent" storage option, you are out of luck. Even if you write session data onto a paper with your pen, the text will eventually disappear..
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Large scale website - which concept/design to use?

Post by Benjamin »

I don't know, maybe we are talking about two different things here. Sessions can be considered a cache, sure why not. The notion that they need to be persistent and/or redundant is a bit off though....
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Large scale website - which concept/design to use?

Post by John Cartwright »

astions wrote: The notion that they need to be persistent and/or redundant is a bit off though....
I agree. Sessions should only hold information related to it's particular session (i.e. not permanent). Maybe the OP needs to explain this philiosophy more.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Large scale website - which concept/design to use?

Post by kaisellgren »

John Cartwright wrote:Sessions should only hold information related to it's particular session (i.e. not permanent).
+1
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Large scale website - which concept/design to use?

Post by josh »

Store them on disk and partition your userbase
Post Reply