How to deliver notifications with Sockets on AWS?

I'm in a project where I need to create a notification system. It's for a website created with the Pyramid framework that runs on the AWS infrastructure (I think the server is apache or paste, not sure).

When a user follows something, all friends should instantly get a notification that states "X is now following Y". Therefore, I need a WebSocket server (maybe node.js or socket.io). If I do so I will have two servers running on the same EC2 instance (the web server and the socket server), but how can I pass the events/notifications from the web server to the socket server?

I guess there should be something in the middle, right? Something that AWS can offer me. Or is there a way to feed the socket server directly?

What would be a good approach for this situation?

A derivated question is: where is the best place to get the friend list that will recieve the notification? Should it be the web server or socket server?

You need a proxy in front of your 2 servers which will delegate requests to either your Pyramid app or to node.js depending on the URL or some other request parameters.

The other option is to run Pyramid in gevent and utilize gevent_socketio to do your work all within the same application.