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