AlignmentResearch / KataGoVisualizer

MIT License
3 stars 1 forks source link

Fix redirect to goattack.far.ai #36

Closed AdamGleave closed 1 year ago

netlify[bot] commented 1 year ago

Deploy Preview for goattack ready!

Name Link
Latest commit e203a221d23cfbe93784b65eb8a3f20b226dbd88
Latest deploy log https://app.netlify.com/sites/goattack/deploys/63adfefadf9aa8000987cbcf
Deploy Preview https://deploy-preview-36--goattack.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

UFO-101 commented 1 year ago

Can we do this at the DNS level? The redirect seems a little slow

AdamGleave commented 1 year ago

Can we do this at the DNS level? The redirect seems a little slow

I'm not sure what you mean by the DNS level. goattack.alignmentfund.org and goattack.far.ai are already both CNAMEs of the same endpoint goattack.netlify.app.

A 301 will add an extra HTTP request and DNS resolution so in that sense it will slow it down inevitably, although I'd hope that'd be pretty quick given Netlify has a CDN and our DNS is served by Cloudflare, so both should be sitting a geographically proximal host.

Open to other suggestions on how to do this!

UFO-101 commented 1 year ago

I'm not sure what you mean by the DNS level. goattack.alignmentfund.org and goattack.far.ai are already both CNAMEs of the same endpoint goattack.netlify.app.

Yes I meant just have the CNAME records and don't redirect.

Also I just discovered that Netlify strongly recommends not using an apex domain as your primary domain, which we currently do for https://far.ai. Not that there is any noticeable issue with that website. Edit: actually I think it's fine if our DNS is served by Cloudflare because they use CNAME flattening. (And I guess you probably know about this because FAR's email addresses wouldn't be working otherwise.)

AdamGleave commented 1 year ago

Yes I meant just have the CNAME records and don't redirect.

This seems worse from a branding perspective, I'd rather keep the redirect.

~Also I just discovered that Netlify strongly recommends not using an apex domain as your primary domain, which we currently do for https://far.ai. Not that there is any noticeable issue with that website.~ Edit: actually I think it's fine if our DNS is served by Cloudflare because they use CNAME flattening. (And I guess you probably know about this because FAR's email addresses wouldn't be working otherwise.)

Yeah, we're using CNAME flattening. It should work fine but might be a bit lower performance since they can't do as much geolocalization with the DNS, as it'll depend on the location of the Cloudflare DNS server rather than the end customer. That said, given Cloudflare DNS servers are anycasted they should be pretty close to the end-user so I wouldn't expect this to make a big difference.

We could switch to Netlify DNS. My guess is we'd actually see more of an improvement from switching to Cloudflare proxying our site -- given it's 100% static it should cache really well, and Cloudflare's CDN is a bit better than Netlify. Both of these feel fairly low priority though relative to e.g. a full website redesign and rebrand.

UFO-101 commented 1 year ago

Yeah, we're using CNAME flattening. It should work fine but might be a bit lower performance since they can't do as much geolocalization with the DNS, as it'll depend on the location of the Cloudflare DNS server rather than the end customer. That said, given Cloudflare DNS servers are anycasted they should be pretty close to the end-user so I wouldn't expect this to make a big difference.

Interesting, thanks!

My guess is we'd actually see more of an improvement from switching to Cloudflare proxying our site -- given it's 100% static it should cache really well

Yeah this would be cool to try at some point