4 months ago
As the title reads. Wondering if there's a speed difference.
2 Replies
In this particular question I was wondering mainly for things such as Redis and PostgreSQL
When changing to using the private URL instead of the public, it appears to solve my bottleneck issues from scaling (large userbase). But it would be neat to get this fact confirmed as well
4 months ago
Yeah, services using the private network will have reduced latency.
Getting
php_network_getaddresses: getaddrinfo for redis.railway.internal failed: nodename nor servname provided, or not knownand
SQLSTATE[08006] [7] could not translate host name "postgres.railway.internal" to address: nodename nor servname provided, or not known (Connection: pgsql, SQL: select "email", "id" from "licenses" where "email"::text ilike %w%)from using the private network URL's in my Laravel project. Any ideas how to approach this?
Maybe I should create a separate issues for this, guessing I somehow have to bind it?
4 months ago
By bind it do you mean the ports?
4 months ago
If so, yes you need to bind the port as according to the private networking docs
Did bind using php artisan serve --host "[::]" --port $PORT, still getting the errors
Is there something special with the railway run environment that could be causing this?
4 months ago
railway run runs the given command locally, and you cannot connect to the private network from outside of the Railway environment as is.
For local development only, you would need to connect to the database over the public network.
4 months ago
For the private network speed vs public yes private will be faster.
Its making a localhost connection vs making an over network, through dns, and resolving to container.
Not saying that the over network is entirely slow but its slower in comparison.
As for that bug I'm not quite sure about it.
noahd
For the private network speed vs public yes private will be faster. Its making a localhost connection vs making an over network, through dns, and resolving to container. Not saying that the over network is entirely slow but its slower in comparison. As for that bug I'm not quite sure about it.
4 months ago
DNS is still involved in private networking 
4 months ago
!s
Status changed to Solved medim • 4 months ago