Sharing sessions across php and nodejs using a database(preferably mysql)

I am designing an application where i need to share sessions across php and nodejs . What i'm designing -> A real-time notifications system . I want the node.js application to get the user_id from the session cookie and push notifications accordingly . I came across three solutions in stackoverflow :- 1) Using nodejs php with mysql . 2) " with redis . 3) " with memcached ..

I need both speed and security , which is the best option ?

I chose Redis over Memcache for custom session storage because you don't want to lose all your existing session data on server restart. for PHP https://github.com/nicolasff/phpredis will help you install the Redis extension. And for Nodejs you can easily search, install and configure the Redis.

Refer here for more useful info http://webandphp.com/IntegratingNode.jswithPHP