R
Railway13mo ago
snöw

ioredis and internal network redis

Trying to connect to redis in node using ioredis and the new private URL, which it doesn't seem to recognise Has anyone gotten redis working over the internal network?
No description
18 Replies
Percy
Percy13mo ago
Project ID: 1cb9508e-4a99-456d-a6fc-4ae49f946789
snöw
snöw13mo ago
1cb9508e-4a99-456d-a6fc-4ae49f946789
ThallesComH
ThallesComH13mo ago
private networking contains a problem where it takes about 100ms to initialize. see docs https://docs.railway.app/reference/private-networking#workaround-for-alpine-based-images
Railway Docs
Private Networking | Railway Docs
Documentation for Railway
snöw
snöw13mo ago
this is in runtime, the 100ms shouldn't be a problem there and also not on alpine afaik
ThallesComH
ThallesComH13mo ago
that occurs during runtime and it's not a alpine thing only
ThallesComH
ThallesComH13mo ago
No description
snöw
snöw13mo ago
by runtime I meant that I'm attempting the connection way after the redis service is deployed or is the 100ms for each connection?
ThallesComH
ThallesComH13mo ago
after each deploy, Railway will bring up a private connection using wireguard (vpn basically) but it takes about 100ms to initialize. so you can delay your application start up or try request loop as suggested until it's up
snöw
snöw13mo ago
I attempt the connection to redis from a node application - not during the startup, rather in response to incoming requests by then both services should be initialized I might be misunderstanding something 😄
ThallesComH
ThallesComH13mo ago
ah ok, make sense now
snöw
snöw13mo ago
i suspect this might be an ipv6/ipv4 thing ioredis has been picky with ipv6 in the past
ThallesComH
ThallesComH13mo ago
maybe, node prefers IPv6 now over IPv4
snöw
snöw13mo ago
yep I think i'll just use the public url, the speed difference isn't that important atm
ThallesComH
ThallesComH13mo ago
GitHub
Unhandled error event: Error: getaddrinfo ENOTFOUND - AWS ElasticC...
Hey guys, did anyone have some issue like that to connect in the AWS ElasticCache in the ECS Container? [ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND cursobeta-dev-elasticache-redis...
acron
acron13mo ago
I'm not seeing a REDIS_PRIVATE_URL advertised in the "Available Variables" tab of my redis service. Does this mean internal is not available? All my other services have Private Networking addresses so I assume it's enabled for my environment.. In fact, I just tried using it in a Variable for another service...
acron
acron13mo ago
No description
acron
acron13mo ago
and it was empty
Fragly
Fragly13mo ago
( ^ acron's question moved to: #Redis doesn't seem to be on Private network )
Want results from more Discord servers?
Add your server