Skip to main content

Magento Session Data choose (file system or database )

Filesystem Session storage

Remember that innocuous setting during Magento install that asks you if you want to store your sessions on disk or in the database? Well if you are like me, you normally choose filesystem, not knowing any better and having never bothered to test or research the consequences (until now)

The benefits of file-based sessions for Magento are simplicity, stability and durability. It's simple because you don't have to do anything to set it up. It's stable because most modern filesystems use journaling to make sure that in the event of a system crash your session data is consistent. It's also durable, because a system restart will not cause you to lose your session data. Coming back to a webstore a week later and not having your items in your cart is annoying, right?

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:

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

Note: Look in app/etc/local.xml.additional for examples but ignore the comment about empty defaulting to files, you need the word files in there.

I have performance benchmarked filesystem storage in the Benchmark section below.

Database Session storage

Database session storage is the other storage type, the one you probably didn't choose during install, and forgot to circle back round and find out if you should have. With database session storage the session data is stored in the Magento MySQL database. The connection used is the same as the core connection.

One of the key benefits of using database sessions is the clustered environment support. In a filesystem based session storage scheme, if you have more than one Magento frontend node in a cluster, they will need to share session data (unless you use a loadbalancer with sticky sessions) and the database gives you that capability quite easily.

Databases also have good stability and durability during crashes and reboots.

One of the problems with database session storage is that it adds more load to the database. On large catalog sites with many SKUs, or busy sites with lots of sessions, this can hurt the database performance.

To use the database for session storage simply have this in your local.xml:

1
<session_save><![CDATA[db]]></session_save>

Check out the benchmarks below to see how well database session storage performs.





Regards,

 
 HERY PURNAMA
 
MCDBA, ITILF, PMP, CISA
 IT & Management Trainer

 http://www.inhousetrainer.net
 inhousetrainer@yahoo.com , hery.purnama@gmail.com
 Call/ SMS/WA :  081.223344.506 | PinBB : 7DC633AA
 
 Blog :
 inhousetrainer.blogspot.com
 freelance-it-trainer.blogspot.com
 
 Social Net :
 facebook.com/inhousetrainer
 twitter.com/inhousetrainer
 instagram.com/inhousetrainer
 
 

Comments

Popular posts from this blog

Pijat Regol Bandung

YOENITA SPA – www.yoenitaspa.com   layanan pijat panggilan daerah  Regol  bandung atau  Pijat Spa di tempat kami langsung di Jl Purwakarta 42 Antapani Bandung, hubungi Tel. Whatsapp 0822.86000.667 , Pijat Terapi di Tempat atau dipanggil ke hotel Apartemen Reflexy Body Massage di sekitar daerah antapani dan menerima pijat panggilan rumah hotel apartemen sekitar    Regol  Bandung , dengan layanan pijat sehat refleksi, body massage, totok wajah serum, pijat tradisional, kombinasi pijat tradisional dengan harga Mulai Rp 50Rb sangat terjangkau buat anda melepas lelah selepas aktifitas pekerjaan Anda di kantor , dirumah atau di perkuliahan. Pijat Yoenita dilayani terapis muda Pria dan Wanita dan untuk semua kalangan umur dengan terapis yang professional dan bersertifikasi dan bukan merupakan layanan pijat plus plus di bandung atau bukan juga pijat yang menyediakan terapi vitalitas buat pria untuk kebugaran, Etika massage kami sangat tegas melarang aktifitas pijat plus kepada sem...

Posting #InformasiPelatihan CISM - Certified Information Security Manager | www.Produk.Club | Token:87 [token:772]

Posting iklan terbaru dari Purnama Academy https://www.produk.club/purnamaacademy di Bandung , #InformasiPelatihan CISM - Certified Information Security Manager | www.Produk.Club , dibuka dengan harga penawaran : Rp 7900000 , Informasi iklan : CISM - Certified Information Security Manager di Bandung, Jakarta, Surabaya secara online atau offline Durasi : 5 Hari, Tersedia paket training exam preparation ataupun implementasi Certified Information Systems Auditor (CISA) ADALAH Sertifikasi CISM dari ISACA dianggap sebagai salah satu sertifikasi utama untuk menunjukkan pengetahuan tentang konsep dan proses manajemen keamanan sibeR Training Lainnya : CISM, CISSP, CISA, CRISC, COBIT, TOGAF, DMBOK, BABOK, PMBOK, PMP, CDMP, CAPM, CTFL ISTQB, CCISO, IT GOVERNANCE, POWER BI, APACHE NIFI, PYTHON DATA SCIENCE Informasi lebih detail silahkan hubungi 0838-0838-0001 (Call/WA) . Untuk info lebih detail terkait iklan silahkan kunjungi listing Iklan www.Produk.Club/purnamaacademy , Terima ...

paus Sastra Lampung Menangkan Lomba Baca Puisi Virtual Jmsi | info lainnya pijat panggilan semarang viestaspa 083804100031

Pencarian Paus Sastra Lampung Menangkan Lomba Baca Puisi Virtual Jmsi Ditemukan Dengan Beberapa Hasil Sesuai Kata Kunci JMSI ZOOM Dan Plus Beberapa Hasil Lainnya Untuk Paus Sastra Lampung Menangkan Lomba Baca Puisi Virtual Jmsi , Silahkan Akses Info Lainnya Pijat Panggilan Semarang Viestaspa 083804100031 Untuk Halaman Yang Ditemukan Perihal JMSI ZOOM Dan Sumber Informasi Bukan Hoax Untuk JMSI ZOOM Agar Mendapat Penjelasan Detail Terkait Paus Sastra Lampung Menangkan Lomba Baca Puisi Virtual Jmsi Yang Trending Per Hari Ini Dan Dapat Membantu Anda Mendapatkan Informasi Menyeluruh Terkait Pencarian JMSI ZOOM, Terima Kasih . Informasi Lainnya Dari Contact.my.id Yang Mungkin Anda Butuhkan Dan Bermanfaat Sambil Membaca Ulasan Berita Paus Sastra Lampung Menangkan Lomba Baca Puisi Virtual Jmsi Tersebut Antara Lain : Info Lainnya Pijat Panggilan Semarang Viestaspa 083804100031 | Informasi WATO.xyz Click To Chat Untuk Plugin Whatsapp Chat Di Web Anda - How To Create Link Using Www.wato.xy...