Views: 2283
Last Modified: 15.09.2022
By default, user session data are stored in the server's file systems. Details can be found at the Store Sessions in Database page (Settings > Web Cluster > Sessions)
In case of a singular web server, such method for session storage in files is the most convenient. It's main advantage is the high performance. As various load tests has demonstrated, the speed of generating site page is reduced for 3-5% when storing sessions in the database.
If there are several web servers available, then a single user query (e. g., a direct authorization request) goes to one server and the next and following queries - to other servers, where a visitor won't be authorized yet. Such situations will cause various inconveniences for site visitors. Also, if sessions are stored in files, visitor statistics will be maintained incorrectly.
User session will be "transparent" for all web cluster servers. That's why it's recommended to enable session storage in database. Enabling the the data storage mechanism for user sessions are executed via the button Store Session Data in The Security Module Database.
Attention! When switching session storage mode, all users loose the authorization (session data will be destroyed).
Note: To reduce load on a database and ensure "session transparency", you can avoid storing sessions in the database, but instead configure and use the module
ip_hash in
nginx.