Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

snotrman's avatar

What URI do I need for ioredis to connect to an amazon redis server?

I'm trying to set up a chat application on heroku with redis and socket.io, but I can't figure out what uri am I suppose to put on the client side.

All uri's I have tried, give me a 404, name_not_resolved, or timeout erorrs.

I have one heroku app, which is running a node.js buildpack, and all it does is runs the socket.js file.

And I have another php heroku app which has the laravel back end with redis broadcasting and a vue front end.

The broadcasting is set up so that when someone publishes a post or makes a GET request of '/', an event is fired on 'new-post-channell' and 'user-entered-chat-channel' respectively.

I can go into the bash of the socket.js app and run 'node socket.js'. I can see that it connects to heroku's redis addon Amazon server and picks up on the broadcasts.

I can also go into the heroku's redis-cli of the second app, into the monitor mode, and see that broadcasts are being picked up as intended.

It all worked in a vagrant homestead virtual server, but doesn't on heroku.

var socket = io('redis://h:oiuhoiuhoiuahwiuwhabw@we4-we-81-167-43.eu-west-1.compute.amazonaws.com:6639');
0 likes
0 replies

Please or to participate in this conversation.