I have to choose Session Save - 'Files' or 'DB' while installing Magento2
What is different, advantage, disadvantage?
What should I choose?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityThis is explained pretty nice in the Magento Devdocs (actually the functionality is the same as in Magento 1):
In the Session Storage Options section, click one of the following options:
File to store user session data on the file system in the
[your Magento install dir]/var/session
directory. File-based session storage is appropriate unless the Magento file system access is slow or you have a clustered database.Database to store user session data in the database. Choose database storage if you have a clustered database; otherwise, there might not be much benefit over file-based storage.
See here: http://devdocs.magento.com/guides/m1x/install/installing_install.html
/var/lib/php5/sessions
).
DB
session storage in database is better for security but add additional load to database.
Files
session storage that uses file system allow easy access to session information via ftp.
In my opinion MySQL is not really a good solution for storing the session data in it since it can slow down your database also it can grow huge.
Either way: Don't forget to set up the cleaning for the sessions because they can take up quite a big space after a while.
We should use Redis for our site.
1) Reduce stress to the website database.