Php – Share PHP sessions in cloud file system

PHP

I know that putting PHP sessions in a common DB is a good solution, but let's say I have to support apps using standards sessions saved in files. It is possible to share PHP session by a pool of n servers using something like GlusterFS? Is there any possibility of corruption of the session files?

Best Answer

Just ensure your platform supports entries locking (files — in case of GlusterFS), or at least — atomical write operations: this will ensure your session files are not corrupted.

In fact, you'd better use Memcached/Redis/... any other mem-storage.