R
Railway10mo ago
Sandeep

How replicas will affect my backend api application

I have one spring boot backend service and it has one scheduler / cron job which runs every 5 second and does some job. Let's say I want to scale so I update the replica field to 2, then in that case I am assuming there will be two cron jobs?
5 Replies
Percy
Percy10mo ago
Project ID: 875623a1-1ac4-45ee-b981-fb94cbc73940
Sandeep
Sandeep10mo ago
875623a1-1ac4-45ee-b981-fb94cbc73940
Brody
Brody10mo ago
yep replicas just means railway is running the app x amount of times, you would want to split the in code cron job off into another service so that it is not run with every replica
Sandeep
Sandeep10mo ago
Oh okay, thanks for the clarification.
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server