Large scale website - which concept/design to use?
Moderator: General Moderators
Re: Large scale website - which concept/design to use?
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.
Re: Large scale website - which concept/design to use?
I have to disagree. I believe memcache is perfectly suitable for storing session data.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.
- 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?
A session is more or less a cache.
Re: Large scale website - which concept/design to use?
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.
- 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?
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)
Re: Large scale website - which concept/design to use?
can also be lost when cache becomes full
- 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?
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..
Re: Large scale website - which concept/design to use?
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....
- 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?
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.astions wrote: The notion that they need to be persistent and/or redundant is a bit off though....
- 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?
+1John Cartwright wrote:Sessions should only hold information related to it's particular session (i.e. not permanent).
Re: Large scale website - which concept/design to use?
Store them on disk and partition your userbase