João Dalla Villa
João Dalla Villa
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Alright, I created a simple project with NestJS and a health check endpoint. In this endpoint, I included console.log(RAILWAY_REPLICA_ID). I deployed the project on Railway with 4 replicas, but I never added RAILWAY_REPLICA_ID to the service variables. Even so, I am receiving null in console.log.
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Hello @Brody , even though I didn't add the RAILWAY_REPLICA_ID to the service variables, I still receive it as empty in my console.log
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
In that case, shouldn't it have a value in console.log?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
But I am simply trying to read it with process.env, without defining it. It was created by Railway itself, right?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Sorry, I still don't understand. How should I define it to be able to read the variable from the code?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Yes, that's why I would like to use this ID as a reference to distribute users among the replicas
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Is there a way to differentiate my replicas at the service layer?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
To give you context, the same application has 4 replicas, but they are socket applications. I want to read my database with 1000 users and distribute 250 to each replica
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
yes
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
🥲
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Hmm, I see. But is there a way to read it or to differentiate the REPLICAS within my application?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Or is there another standard for reading them in the application?
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
No description
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
Nodejs server
30 replies
RRailway
Created by João Dalla Villa on 7/24/2024 in #✋|help
RAILWAY_REPLICA_ID empty
92e4a81b-58fc-4487-8c5e-6dee0616fc2f
30 replies