Skip to content
Service replicas
tristonplummer
OP

2 years ago

Hello

Just wondering if there’s any way to address a specific replica for a service? My use case is that I’d like to perform my own sort of load balancing and would like to tell an end user which replica they should connect to.

Kind regards

Triston

Closed

21 Replies

tristonplummer
OP

2 years ago

d230d706-2f0e-433a-86c2-22bc6ec11f55


2 years ago

You can create replicas in your service settings

1282328177380823070


2 years ago

individual replica addresses are exposed via a AAAA DNS lookup, example -

So with this list you can implement your own load balancer logic, or use caddy to handle this for you, example -


tristonplummer
OP

2 years ago

Much appreciated!


2 years ago

no prob, let me know if you have any more questions!


shubhankartrivedi

2 years ago

can you explain more on this?


2 years ago

what would you like explained?


shubhankartrivedi

2 years ago

I just need a doc about replicas in detail


2 years ago

what information are you seeking?


shubhankartrivedi

2 years ago

related to how I can setup custom load balancing if I have replicas


shubhankartrivedi

2 years ago

ik by default it uses round-robin


2 years ago

is round robin not desirable?


shubhankartrivedi

2 years ago

yep, i want to do something like "active" & "inactive" state


shubhankartrivedi

2 years ago

so new visitors will go to an "inactive" state and then it's flagged "active"


shubhankartrivedi

2 years ago

then after some coding logic, it is set back to "inactive" and ready for use


2 years ago

what would be the use case for this?


shubhankartrivedi

2 years ago

ahh you're asking soo many questions


shubhankartrivedi

2 years ago

i'm gonna answer later cuz busy


2 years ago

no worries at all, sorry for all the questions but the answers help me to deliver a better response 🙂


shubhankartrivedi

2 years ago

@Brody okay I know that railway uses round-robin by default but I wanna use my custom system for load-balancing on replicas.

Is there is any blog or doc for this?


2 years ago

there is this tutorial for proximity steering https://docs.railway.app/tutorials/proximity-steering


Welcome!

Sign in to your Railway account to join the conversation.

Loading...