Follow by Email

Wednesday, May 28, 2014

How many type of session having in magento?

There have three type of session in magento.
1) Filesystem Session storage
2) Database Session storage
3) Memcached Session storage

 Filesystem Session storage  

To enable file-based storage, choose it during installation or in your app/etc/local.xml file simply make sure you have a session_save tag like this:

<session_save><![CDATA[files]]></session_save>

Database Session storage
 To use the database for session storage simply have this in your local.xml:   
<session_save><![CDATA[db]]></session_save>


Memcached Session storage

Memcached session storage takes a bit more setup than either of the previous two options, which is probably why it’s not considered a ‘normal’ option during Magento install. For starters you need a Memcached server running.

Once you have it up and running, the memcached session storage offers a number of benefits. Firstly it is very cluster friendly. The session data can be shared by any number of webnodes, and to make things even better you can easily add more memcached server nodes so that even your session storage can be scaled to handle many 1000′s of concurrent sessions*. Secondly, it is (or can be) separate of the database and web node entirely, which offloads the work of storing sessions from busy nodes in a high-traffic environment.
To use a memcached session store in Magento you’ll need to have this in your app/etc/local.xml:   
<session_save><![CDATA[memcache]]></session_save>
<session_save_path><![CDATA[tcp://localhost:11211?persistent=1&weight=2&timeout=10&retry_interval=10]]></session_save_path>

No comments:

Post a Comment