I would guess that enabling caching on the external nginx would have the same benefit with respect to loading the unicorns, without having to set up a CDN. I see cache control headers on all the javascript assets, so I might give this a try…
… well, I see the internal nginx is also already using proxy_cache with a 7d validity for non-error requests:
location ~ ^/(svg-sprite/|letter_avatar/|letter_avatar_proxy/|user_avatar|highlight-js|stylesheets|theme-javascripts|favicon/proxied|service-worker) {
...
# note x-accel-redirect can not be used with proxy_cache
proxy_cache one;
proxy_cache_key "$scheme,$host,$request_uri";
proxy_cache_valid 200 301 302 7d;
proxy_cache_valid any 1m;
proxy_pass http://discourse;
break;
}
How does a CDN help with unicorns in that case? I see stylesheets in that list.