I have a custom dns set up at one.com. I have added CNAME and AAAA for the custom domain but sometimes the lookup is very slow. It can take up to 10-20 sec for the domain to be found.
Do I need to do some more configuration?
The CNAME is connected to fly _acme-challange url and the AAAA is configured as the docs suggests.
It is a remix.run app that uses the remix.run serve adapter.
Strange, it should be milliseconds, rather than seconds.
Is this the very first time you connect to the app after a deploy (so within, say, 60 seconds of deploying)? Or does it persist and is still an issue once several minutes have passed?
Only there is a known issue (which is being fixed) where, after a deploy, it can take a minute or so for the new vm/instance to be found by the proxy, and that can result in large delays in requests being responded to.
If so, that can be mitigated by having a minimum of three vms and using a rolling deploy strategy to give time for them to be recognised:
If I deploy a new Docker image it will take a long time. This is after I have hit refresh some time and let the app rest for a while. The first deploy takes up to 1 minute as you have explained.
This time it took 5 sek but it general takes longer.
It depends what you mean by let it rest āa whileā. Under/over 60 seconds?
Only currently what happens (if you only have one vm/instance) is when you do a deploy, it can take about a minute before the app is fully ready to go (propagated/picked up by proxy, routing etc). That is after each deploy (as each deploy results in a new vm/instance).
But after a minute (or so) your app should then be ready. So delays of 5s+ beyond then are not normal and point to an issue.
So the question is are you getting 5 second response times still, like an hour after deploying?
If so, one thing to check your general routing vs. Fly is to visit https://debug.fly.dev/ in your browser. What do you see for the Fly-Region header in the response it shows? It should be one geographically close to you. Like ⦠Iām in the UK, and I get a response back from ālhrā, so itās a super-fast. That should be the speed you are getting. If you are e.g in Australia and get a response from e.g Europe, that would point to some anycast/route issue, which would indeed cause an initial delay. Unlikely but Iāve had that with other providers in the past. Worth a check.
I am experiencing the same problem on my project on fly, where i have a domain on namecheap and I just benchmarked my site and got āInitial connectionā and āSSLā (in network tab) that took 7 seconds, and second benchmark (when SSL have been established) took the whole site load 400 ms. Hopefully I can help provide more info to solve this.
edit: Forgot to mention that last deploy to this project was 2 days ago and I am getting this issue consistently with no clear signs its just after deploys.
I tried the debug.fly.dev and got region āfraā while in sweden.
So the question is are you getting 5 second response times still, like an hour after deploying?
Iām getting the slow response like an hour, 15 hours etc after deploying. I Will check the region again but the fly.io instance is in Frankfurt and Iām in Gotehnburg/Stockholm area sĆ„ it should be fast.
The dev url works fast all the time. https://subdomain.fly.dev/ always has a fast response (except the initial one after deploy)
The debug gives me Fly-Region: fra and I have deployed to that region
It doesnāt sound like a routing issue then for either of you since (as far as I know) Fly doesnāt have an edge in Sweden so a request being handled by a European region (France/Germany) would be correct.
And it canāt be the slow propagation issue on-deploy, as you both say itās well after you deployed, which is when that problem is (for now) apparent.
Hmm.
Seems like this may be one for Fly Iām afraid. They will have access to their proxy innards and could perhaps track a request, SSL handshake etc. If you can provide a Fly request ID (you can get that from the headers) for a request that takes ages, like 5 seconds, they may be able to see that in their logs and see what happened during that request, and see if anything stands out.
New certificates for apps we havenāt āseenā before can be slow several times per region. Each of our edges keeps a local cache, once the cert is cached it should be very fast.
How many requests did you run that got 7s response times?
I just made another try and got 7,5 seconds, however request made right after is very fast, but then after a while of not requesting it will become slow again for the first request in a while.
Weāre looking at this, our Vault cluster is slow to serve uncached certs, but after about 10 connections per region you shouldnāt ever notice that. This is good information, thank you.
This should be improving now, we discovered a few sources of slowness. Our Vault store is under heavy load and weāre working to scale it.
We also issue both RSA and ECDSA certificates for hostnames ā many ECDSA certificates were behind, and we found that apps with only RSA certs would check vault for ECDSA certificates before handshaking. This is now fixed, once a cert is cached and fast we donāt wait on any vault lookups before the handshake happens.
I have a Phoenix LiveView app with region in NRT, secondary regions HKG and SIN. Typically, latency between Korea and Japan should be around 50-60ms, but Iām getting websocket (LiveView) responses of something around⦠a second I think? Thanks for your help!