symfony has the file session storage class, PDO session storage class but has no MongoDB session storage class.
So I wrote the symfony session storage class with using MongoDB.
You can use below.
As a matter of course I don't think MongoDB is the best solution for session storage but it's faster than MySQL session storage.
configurationIf you use sfMongoSessionStorage class, you configure the factories.yml.
storage: class: sfMongoSessionStorage param: host: localhost #hostname port: 27017 #port number db_name: symfony #DB name collection_name: session #collection name
bench mark resultsThis is the bench mark results on my local machine.
$ ab -n 5000 -c 100 http://localhost/index.php
MongoDB session storage is much faster than MySQL one.MySQL => Requests per second: 10.86 [#/sec] (mean) MongoDB => Requests per second: 16.61 [#/sec] (mean) Default => Requests per second: 17.58 [#/sec] (mean)