Super slow performance

I just migrated our production site over to netlify and I’m seeing some super slow performance.

We’re on the business plan FWIW.

Testing from a wired gigabit connection

wget https://static.vanta.com/static/index.c4254ba7.js
--2022-05-25 17:08:28--  https://static.vanta.com/static/index.c4254ba7.js
Resolving static.vanta.com (static.vanta.com)... 138.68.50.15, 138.197.214.0, 2604:a880:2:d0::20b2:9001, ...
Connecting to static.vanta.com (static.vanta.com)|138.68.50.15|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13766805 (13M) [application/javascript]
Saving to: ‘index.c4254ba7.js’

index.c4254ba7.js   100%[===================>]  13.13M   175KB/s    in 85s     

2022-05-25 17:09:53 (159 KB/s) - ‘index.c4254ba7.js’ saved [13766805/13766805]

I tried again and it’s faster now. But the slow performance was confirmed but other users on the west coast.

➜  ~ wget https://static.vanta.com/static/index.c4254ba7.js
--2022-05-25 17:13:32--  https://static.vanta.com/static/index.c4254ba7.js
Resolving static.vanta.com (static.vanta.com)... 184.72.19.87, 50.18.120.10, 2600:1f1c:471:9d01:72ed:135d:4dff:a852, ...
Connecting to static.vanta.com (static.vanta.com)|184.72.19.87|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13766805 (13M) [application/javascript]
Saving to: ‘index.c4254ba7.js.1’

index.c4254ba7.js.1 100%[===================>]  13.13M  16.3MB/s    in 0.8s    

2022-05-25 17:13:33 (16.3 MB/s) - ‘index.c4254ba7.js.1’ saved [13766805/13766805]

13.13M of JavaScript is impressive.

Loading it from Australia got…

wget https://static.vanta.com/static/index.c4254ba7.js
--2022-05-26 10:50:30--  https://static.vanta.com/static/index.c4254ba7.js
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving static.vanta.com (static.vanta.com)... 54.206.202.192, 54.206.231.79, 2406:da1c:6aa:c001:d259:ca50:eb2a:ae16, ...
Connecting to static.vanta.com (static.vanta.com)|54.206.202.192|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13766805 (13M) [application/javascript]
Saving to: ‘index.c4254ba7.js’

index.c4254ba7.js    100%[====>]  13.13M  2.11MB/s    in 7.6s

I know this is a throwaway line, but…
The Business Plan uses the same “Standard” network as the “Pro” and “Starter” plans.
Only the Enterprise Plan advertises as using a faster network.

Files > 5MB are not cached on the node, they are always served from origin.

Perhaps try reducing the size of the file, split it into smaller chunks < 5MB.

1 Like

OK, that’s good to know. A few follow up questions

  1. Is that 5MB limit documented somewhere? I can’t find a reference to it
  2. If I precompress the files, does that get me around the 5MB limit?
  3. Why the huge variation in download times (it’s like 100x difference between the two wget calls I made above)? Is there some caching happening somewhere?

It is mentioned in several posts in these forums.

I cannot confirm nor reject the idea as I have not tried. If you test this out, please do respond with your findings. :slight_smile:

Given the difference (85s vs 0.8s) possibly locally.

I ran wget https://static.vanta.com/static/index.c4254ba7.js in a VM four times, received the same result each time 2.1s

$ wget https://static.vanta.com/static/index.c4254ba7.js
--2022-05-26 13:06:08--  https://static.vanta.com/static/index.c4254ba7.js
Resolving static.vanta.com (static.vanta.com)... 54.206.202.192, 54.206.231.79, 2406:da1c:6aa:c000:3257:de9:cb67:d5d, ...
Connecting to static.vanta.com (static.vanta.com)|54.206.202.192|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13766805 (13M) [application/javascript]
Saving to: ‘index.c4254ba7.js’

index.c4254ba7.js                  100%[================================================================>]  13.13M  6.20MB/s    in 2.1s

2022-05-26 13:06:11 (6.20 MB/s) - ‘index.c4254ba7.js’ saved [13766805/13766805]

Hi Coel,
Thanks for trying it out and the pointer to search the forum for the 5MB limit. It would be great if that limit was documented more clearly (like cloudflare pages does for its 25MB limit - https://developers.cloudflare.com/pages/platform/limits/#file-size)

Tom

While this seems to come up rarely, it is possibly something that could have better documentation. This is something for Netlify’s Documentation Team.

I shall flag this post to ensure the Support Team see it and can pass your feedback along.

Support rep here. Yes, the way we handle files depends on their file size - what Coel says is correct, that the cutoff is around ~5mb (I don’t think it’s actually 5mb on the dot)

anything less than that will come through from the node, and everything above will stream from the origin.

The netlify docs don’t really contain tons of infrastructure info about our CDN, but i will check in with docs team and ask if we can put this info somewhere.

In general, if something is mentioned in a #netlify-support:support-guides then it is safe to trust. The closest i found to mentioning this limit is in here:

i agree that we could have this better documented and I’ll see what we can do about that.

In the meantime, breaking files down into smaller sizes is the way to go. Not sure what you mean by pre-compressing - are you talking about compressing them locally and then using asset optimization to squeeze them down further or? Not sure using our asset optimization algo will help much on top of what you are already doing)

1 Like