Latency increased
mateo
PROOP

a month 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

a month ago

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

Status changed to Open Railway 28 days ago


a month ago

Try disabling proxy mode and switching to DNS only on cloudflare


mateo
PROOP

a month ago

Ok, I'll try it


milo

Try disabling proxy mode and switching to DNS only on cloudflare

mateo
PROOP

a month ago

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


a month ago

Could you share a screenshot?


mateo
PROOP

a month 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

a month ago

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


a month 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

a month 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

a month 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.


a month ago

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


mateo
PROOP

a month ago

It happens in both, custom domain and railway default domain


a month ago

try using edge caching


mateo
PROOP

a month 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?


a month ago

Yup, sounds exactly why


Status changed to Solved mateo 28 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...