Set up geoDNS
davidvandewalle
PROOP

2 years ago

I want to set up geoDNS.

The goal to reach is:

-when my European users go to domain.com, they connect to my EU West service

-when my US users go to domain.com, they connect to my US West service

-when my Asian users go to domain.com, they connect to my Southeast Asia service

-Other users who go to domain.com will connect with my EU West service

The problem I'm facing is that I can set up multiple services in different regions, but I can't give them the same custom domain name.

I would be able to set up geoDNS in route53 or Cloudflare and point it to the right abc123-location.up.railway.app URL for each service, but because I can only add the custom domain name once to a service, I guess it won't work.

Any idea how I can solve this?

3 Replies

2 years ago

This is do-able with Cloudflare, however it requires a paid Cloudflare plan.

Try setting this up with a Cloudflare tunnel, that way SSL is handled by Cloudflare and you won't need any custom domains set on your Railway services.


davidvandewalle
PROOP

2 years ago

This is do-able with Cloudflare, however it requires a paid Cloudflare plan.

Try setting this up with a Cloudflare tunnel, that way SSL is handled by Cloudflare and you won't need any custom domains set on your Railway services.

Thank you

I know this solution, but doing it that way is a performance hit because all the data has to pass through Cloudflare.

Is there another option to solve this?


2 years ago

There is no way to do it so that traffic doesn't pass through an external service on account of this not being something Railway natively supports, they do plan to support it in the future where you can select multiple regions per service and their proxy will handle the geo-routing.

But with that said, there would be little performance hit by using the cloudflare tunnel method because that method would be bypassing Railway's proxy.


Loading...