
Ask HN: How do I approach improving website latency? - cactus22
Hello,<p>I recently put together a side project using GCP on 
a MEAN stack. It involves a load-balancer performing ssl-termination, then routing to a small instance, which then returns static assets. Once the static assets are received, the browser will render the html and make another call to the backend, which then loads some data from a managed mongoDB stack and returns that data to be rendered as well.<p>The load time for the website is ~15 seconds total, the first half of which being for the initial call involving only static assets. I am trying to figure out why it is so slow but am having trouble doing so.<p>The instance is in Iowa (us-central1) while I am in Seattle. I tried only serving plain html&#x2F;css in the initial call, but load time was still terrible.<p>I am not sure where I should focus my investigation, or if this is to be expected for an instance so far away, and if I just need to have an instance closer to me. Let me know what you think
======
itqwertz
You should start by looking into the network requests. Most developer tools
show you metrics on load time.

Do you have a link? I’m sure we could get to the root of your issue quickly.

------
PaulHoule
I think you are making hard for yourself. Try Azure.

~~~
cactus22
What do you mean?

~~~
PaulHoule
Unless your download is really so big it really takes 15 seconds, you sound
like you are in cloud hell.

One way to get out is to store the static web pages in an object store and
serve them through a CDN. That is dead easy and will perform well.

