2isprime
2isprime12mo ago

Latency Issue with Custom Domain

hello , we have a scenario where we are calling the self hosted zitadel instance via a custom domain. The Zitadel instance is hosted in UAE region. We have observed a latency increase on this setup and below are the observations: 1. We have a postgres RDS instance in the same region and same cluster - The latency drops by 200ms if we keep the postgres DB in the same container as Zitadel and do not use RDS. We have to use RDS , so is there any configuration to make on RDS to reduce latency, or this cannot be the reason 2. Another observation is that when our services (UAE region )communicates with Zitadel(UAE region) , cloudFlare is resolving DNS to California , can this be a reason, if yes .... can we have a custom domain which we can use to access console and a internal domain to access the Zitadel API avoiding DNS resolution. because when I try hitting the local domain at 8080, I get an error that the instance is hosted on. <custom Domain> . Can you please suggest the best approach here
2 Replies
2isprime
2isprimeOP12mo ago
{"code":5,"message":"unable to set instance using origin https://zitadel:8080 (ExternalDomain is <custom domain>): ID=QUERY-1kIjX Message=Instance not found. Make sure you got the domain right. Check out https://zitadel.com/docs/apis/introduction#domains Parent=(unable to get instance by host zitadel:8080: ID=QUERY-1kIjX Message=Errors.IAM.NotFound)"} is there a way I can call zitadel through the local URL, I want to avoid the DNS resolution time that is adding up to latency
FFO
FFO12mo ago
I do not think DNS latency should be too much a concern... i mean since it is usually cached, right. Not sure about your scenario above, but a recommendation is to keep zitadel close to the DB since that connection is more latency sensitive. But the http connection is fine going long journeys. We do the same in our cloud and do not see many big issues.

Did you find this page helpful?