Application performance issue. The same site, 10 times faster accessible from applications than from my domain

This is really strange for me, and it turns into a real problem.

I create a site in appengine (java) using scala and it works very slowly when accessing from my domain:

/latest 200 1505ms 2325cpu_ms 1586api_cpu_ms 4kb 

But when accessed from appspot it works much faster:

 /latest 200 180ms 269cpu_ms 221api_cpu_ms 4kb 

I bought a domain through Google apps so that it automatically sets up. I can’t understand how this can happen ... Maybe this is something in my code? Or is it something about configuration?

The problem is completely reproducible, and if you need to see the difference in speeds, this is noticeable simply by contacting the site. these are the links:
http://secretsapp.appspot.com/latest
http://www.whatasecret.com/latest

Many thanks.

+4
source share
3 answers

I figured out the reason ... It was a cookie problem that was in my code.

It was extracting a lot of objects from db when the user voted for some messages (which are stored in a cookie). Therefore, I voted in one domain, and not in another. This is now fixed.

+1
source

The most likely explanation for this is that you sent your first request to a new runtime, which took some time to start, while the appspot domain request was served by a pre-warmed runtime (probably the same). Try to send several requests to each domain and accept a minimum - there should not be a statistically significant difference.

+2
source

Just access to both links, and they seem to take about the same time, although it took a long time to start the download. I assume that since they are newly registered domains, they are not yet cached by the DNS server of your Internet service provider, so the last domain takes longer to resolve. I hope the problem should disappear in a short time.

+1
source

All Articles