a***i 发帖数: 39 | 1 用一个db table去maintain以登陆用户的session,有什么好处和坏处? |
g********g 发帖数: 2172 | 2 For a large site with multiple server, session stored in db can be access
from multiple servers. So there will be no issue is this page comes from
server 1 next page comes from server 2. But it is expensive.
【在 a***i 的大作中提到】 : 用一个db table去maintain以登陆用户的session,有什么好处和坏处?
|
a***i 发帖数: 39 | 3 thanks, i think that's a very important advantage. How can this be handled w
/o a db storing sessions? Store the encrypted session info in user cookie?
【在 g********g 的大作中提到】 : For a large site with multiple server, session stored in db can be access : from multiple servers. So there will be no issue is this page comes from : server 1 next page comes from server 2. But it is expensive.
|
g********g 发帖数: 2172 | 4 without db, it is either in memory or file system. The web/application
server will handle the session storing. All you need is add and retrieve
value into and out of session. You do not need to worry about how to store.
w
【在 a***i 的大作中提到】 : thanks, i think that's a very important advantage. How can this be handled w : /o a db storing sessions? Store the encrypted session info in user cookie?
|