Jump to content

What do usually go for?


waynewex

Recommended Posts

Do you use server-side sessions, cookies, server-side sessions & cookies, or any of the aforementioned in correlation with a database?

 

I was all into server-side sessions and cookies until I read that it is hard to scale up an application when it relies on server-side sessions. However, I'm not mad about db session handling either, as I'm very weary of causing additional overhead.

 

What opinion/knowledge/experience/divine inspiration do you guys have on the subject?

 

 

Link to comment
Share on other sites

File based sessions usually don't work very well on a cluster, and in that situation, one of the few solutions is to use DB sessions.  I guess any form of caching could be used really, where it all comes from one location.  (In which case, files could actually be used if locking was right.)

Link to comment
Share on other sites

Why?

 

 

Everything scales differently.  There are different advantages/disadvantages to everything.

 

 

Let's say you have a cluster of 20 servers on a LAN with different access points.  Are you going to use file based sessions?  Have fun with file locking.

Link to comment
Share on other sites

Why?

 

 

Everything scales differently.  There are different advantages/disadvantages to everything.

 

 

Let's say you have a cluster of 20 servers on a LAN with different access points.  Are you going to use file based sessions?  Have fun with file locking.

 

Oh I understand that. If it wasn't for that fact, I wouldn't have brought the topic up. I'm just saying that it's pretty difficult to choose what kind of system to implement. You may be wanting to use DB Sessions in order to make your website more scalable, yet the fact that you're only starting a website off, in it's early stages, means that DB resources are probably going to be pretty minimum.

 

All sessions here are stored in the database.

 

Oh I knew that. But then again, PHPFreak's resources are far more powerful than somebody who is just launching a new website.

Link to comment
Share on other sites

Why?

 

 

Everything scales differently.  There are different advantages/disadvantages to everything.

 

 

Let's say you have a cluster of 20 servers on a LAN with different access points.  Are you going to use file based sessions?  Have fun with file locking.

 

Oh I understand that. If it wasn't for that fact, I wouldn't have brought the topic up. I'm just saying that it's pretty difficult to choose what kind of system to implement. You may be wanting to use DB Sessions in order to make your website more scalable, yet the fact that you're only starting a website off, in it's early stages, means that DB resources are probably going to be pretty minimum.

 

All sessions here are stored in the database.

 

Oh I knew that. But then again, PHPFreak's resources are far more powerful than somebody who is just launching a new website.

 

you know and understand everything, don't you?

Link to comment
Share on other sites

All sessions here are stored in the database.

 

Oh I knew that. But then again, PHPFreak's resources are far more powerful than somebody who is just launching a new website.

 

Oh, yeah, but it's the forums too, so anyone running SMF will be storing session data in the table. We have more resources because we get more hits. A site with less hits will require less resources as well.

Link to comment
Share on other sites

Why?

 

 

Everything scales differently.  There are different advantages/disadvantages to everything.

 

 

Let's say you have a cluster of 20 servers on a LAN with different access points.  Are you going to use file based sessions?  Have fun with file locking.

 

Oh I understand that. If it wasn't for that fact, I wouldn't have brought the topic up. I'm just saying that it's pretty difficult to choose what kind of system to implement. You may be wanting to use DB Sessions in order to make your website more scalable, yet the fact that you're only starting a website off, in it's early stages, means that DB resources are probably going to be pretty minimum.

 

All sessions here are stored in the database.

 

Oh I knew that. But then again, PHPFreak's resources are far more powerful than somebody who is just launching a new website.

 

you know and understand everything, don't you?

 

No? But I do know about/understand what they were talking about above. Hence the reason I started the topic?

Link to comment
Share on other sites

All sessions here are stored in the database.

 

Oh I knew that. But then again, PHPFreak's resources are far more powerful than somebody who is just launching a new website.

 

Oh, yeah, but it's the forums too, so anyone running SMF will be storing session data in the table. We have more resources because we get more hits. A site with less hits will require less resources as well.

 

That's what has got me pandering towards DB Sessions. But as I said, I was just a little weary. I'll be launching a site in the next month or so on a shared hosting plan, so it's things like these that really get me worrying. Use server side sessions and scalability will be a nightmare. Use DB Sessions and you're looking at extra overhead on a site that is completely dynamic. But, I suppose, DB Sessions aren't really a choice, they're more of a necessity if you're planning to upgrade without a hitch. Also, on a shared host, server-side sessions are far more risky. I think that I'll be pretty okay in terms of changing the system to use DB Sessions, as I use abstracted most of the session functionality on my site.

Link to comment
Share on other sites

"Use server side sessions and scalability will be a nightmare."

 

 

Server side sessions?

 

 

Are there client side sessions???  New to me.

 

 

The basic concept of a session is to load data on the server side based on a token provided by the client.

 

I never insinuated that were client side sessions? Please keep the pedantry at bay.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.