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?
14 Replies
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
Ok, I'll try it
milo
Try disabling proxy mode and switching to DNS only on cloudflare
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
milo
Could you share a screenshot?
a month ago
Do I need to configure something else in Cloudflare or Railway?
milo
try deleting the custom domain and the dns entry then recreating
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?
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?
a month ago
It happens in both, custom domain and railway default domain
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?
Status changed to Solved mateo • 28 days ago
