Latency increased
mateo
PROOP

2 months ago

I'm experiencing latency in my requests. I'm using Cloudflare as a proxy. My application has pagination, but even if there's only one record returned, I'm experiencing latency in most of the requests. Moreover, I already checked my side, and my API is built correctly to avoid those latency errors.

Does anyone know what could be happening?

image.png

image.png

Solved$20 Bounty

14 Replies

Railway
BOT

2 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 2 months ago


2 months ago

Try disabling proxy mode and switching to DNS only on cloudflare


mateo
PROOP

2 months ago

Ok, I'll try it


milo

Try disabling proxy mode and switching to DNS only on cloudflare

mateo
PROOP

2 months ago

I disabled it, but now it is trying to issue the TLS certificate, and it seems that it's not issuing it


2 months ago

Could you share a screenshot?


mateo
PROOP

2 months ago

I forgot to mention that I'm using a custom domain, and this is the configuration on Cloudflare and Railway

image.png

image.png


milo

Could you share a screenshot?

mateo
PROOP

2 months ago

Do I need to configure something else in Cloudflare or Railway?


2 months ago

try deleting the custom domain and the dns entry then recreating


milo

try deleting the custom domain and the dns entry then recreating

mateo
PROOP

2 months ago

After deleting, the TLS certificate was issued. It seems that Cloudflare was not the problem. I'm still experiencing high latency. My application has pagination and indexes. I'm also fetching only necessary data. However, the issue persists. Is there any other configuration that I should look at?


mateo
PROOP

2 months ago

My server and database are located in the same region. US EAST (Virginia, USA). I have another application with the same configuration, and that application works seamlessly.


2 months ago

does this happen just on the custom domain or also happen on a railway domain?


mateo
PROOP

2 months ago

It happens in both, custom domain and railway default domain


2 months ago

try using edge caching


mateo
PROOP

2 months ago

I think I found the issue. I had configured in my server application the public variables of the database. However, after updating the variables to use the postgres internal host and related internal variables, rather than the public ones, the latency decreased, and now responses take less than 50ms.

Was having the public variables configured a probable cause of the increasing latency?


2 months ago

Yup, sounds exactly why


Status changed to Solved mateo • 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...