NYCPHP Meetup

[nycphp-talk] Cookies as session database [was php scalability]

George Webb gw.nyphp at gwprogramming.com
Thu Aug 14 13:25:10 EDT 2003


As an offshoot of this topic, what does anyone think of using
HTTP cookies as the session database?

	It seems to me the largest problem with the scalability
issue is allowing the large number of user sessions to persist
across the multiple hosts in the cluster.  So if this session
data came from the user, rather than a central backend database,
then the hosts could operate much more independently.

	Of course some clients (web browsers/users) do not
support HTTP cookies, for various reasons.  So in that case,
the server-side application could allow the conventional server-side
session-hosting.  Such a session mechanism would take effect
only if the client failed to pass a basic HTTP cookie test.

	Also, cookies have limitations, such as data size.  But,
for example, with a shopping cart application (like I am currently
building for high-availiability deployment), such session data could
easily fit within the 4096-byte limit of the latest HTTP Cookie
RFC (2965).

	Thanks for your thoughts.


Regards, George.

George Webb
gw.nyphp at gwprogramming.com



More information about the talk mailing list