I'm very new with Redis and Node.js, but I would like to enhance my web application performance using Redis, and adding a realtime notifications feature using Node.js.
Now, I have added 1 EC2 instance to serve both process, bind it with an elastic IP address, and its associated subdomain. However, I read in Redis website that a machine that running Redis should not be exposed to untrusted environment.
From http://redis.io/topics/security
Redis is designed to be accessed by trusted clients inside trusted environments. This means that usually it is not a good idea to expose the Redis instance directly to the internet or, in general, to an environment where untrusted clients can directly access the Redis TCP port or UNIX socket.
In other hand, the Node.js which listen to websocket protocol must be exposed to the internet so my web application can have realtime interaction with it.
So my first question is, do I really need 2 EC2 instances, each for Redis and Node.js?
My second question is: What is the best way to keep my existing PHP session and have the Node.js recognizes the just-loggedin-user using PHP session?
I almost modify my PHP session, change it from in-table session to Redis session, until I read the guide from Redis website above.
Thank you.