8 ms·
Faster, More Awesome GitHub Pages
- pbreit 13y agoWhat CDN? CloudFlare?
- dangrossman 13y agoc:\>ping dangrossman.github.io Pinging github.map.fastly.net [199.27.72.133] Fastly (http://www.fastly.com/ http://www.fastly.com/).
- toomuchtodo 13y agoSo I'm not the only one who went looking :) Not sure why they don't mention the specific CDN on their blog post. Possibly because they host at Rackspace but don't use Rackspace's CDN? (Which is white label Akamai last time I checked).
- julien_c 13y agoApparently they don't yet have a great network of nodes in Europe though: ping dangrossman.github.io round-trip min/avg/max/stddev = 16.173/16.275/16.463/0.074 ms (From Paris, France) In comparison, Cloudfront is something like 2ms away.
- bevacqua 13y agoThey've been using fastly for a while now, makes sense that they're using fastly in this case as well.
- philip1209 13y agoDoesn't look like it: dig +short NS github.io ns2.p16.dynect.net. ns4.p16.dynect.net. ns1.p16.dynect.net. ns3.p16.dynect.net.
- dangrossman 13y agoYou need to hit a subdomain of github.io (any subdomain) to see the CDN; that's where user pages live.
- tedivm 13y agoAll that shows is who they're hosting their DNS with, it has nothing to do with using a CDN. Dynect offers a CDN management tool that makes it easy to balance multiple CDNs across specific regions, so I'm not at all surprised they're using them for their DNS.
- philip1209 13y agoIf they were using Cloudflare, as the other commenter had asked, they would be using Cloudflare nameservers
- tedivm 13y agoWhile it's true that they could be using the DNS servers, it's not true that they have to- https://support.cloudflare.com/hc/en-us/articles/200168706-How-do-I-do-CNAME-setup- https://support.cloudflare.com/hc/en-us/articles/200168706-H...
- deleted 13y ago[deleted]
- prezjordan 13y agoIs there any way to point my github page (jdan.github.io) to a domain (let's say www.example.com) without losing all my projects' github pages (i.e. jdan.github.io/cleaver)? Last time I tried it wasn't possible.
- sheetjs 13y agoIf you put a CNAME file in the repo, all of the project pages automagically route. For example, sheetjs.github.io is configured to handle oss.sheetjs.com: https://github.com/SheetJS/SheetJS.github.io/blob/master/CNAME https://github.com/SheetJS/SheetJS.github.io/blob/master/CNA... The gh-pages branch for js-xls (https://github.com/SheetJS/js-xls/tree/gh-pages https://github.com/SheetJS/js-xls/tree/gh-pages), accessible at http://sheetjs.github.io/js-xls http://sheetjs.github.io/js-xls, now redirects to http://oss.sheetjs.com/js-xls http://oss.sheetjs.com/js-xls (and does the right thing so long as the main site repo doesn't have a conflicting directory) As an example of a conflict, consider http://oss.sheetjs.com/test_files/ http://oss.sheetjs.com/test_files/ . The test_files repo (https://github.com/SheetJS/test_files/tree/gh-pages https://github.com/SheetJS/test_files/tree/gh-pages) is masked by the test_files subdirectory of the main repo (https://github.com/SheetJS/SheetJS.github.io/tree/master/test_files https://github.com/SheetJS/SheetJS.github.io/tree/master/tes...)
- prezjordan 13y agoHmm, so changing gh-pages on a project doesn't change anything, because it redirects anyway? That's sort of a bummer. Thanks for your insight though, much appreciated.
- sheetjs 13y agoI think "route" was the wrong word. If you set up CNAME in github.com/jdan/jdan.github.io to jordanscales.com, then accessing jdan.github.io/cleaver will result in a request to jordanscales.com/cleaver. If your repo github.com/jdan/jdan.github.io has a cleaver subdirectory, then it will direct to the directory in the repo (masking the gh-pages branch). However, if you do not have a cleaver subdirectory (which is the case at the moment of writing), the gh-pages branch will be visible
- namecast 13y agoInteresting how ALIAS records are becoming a de-facto DNS protocol feature. Despite not having even an RFC draft proposing their existence, GitHub recommends using ALIAS records, and large players (e.g. AWS, Dyn, and DNSSimple IIRC, as well as us) now support adding ALIAS records to a domain. I wonder why ALIAS took hold but DNAME and ANAME records were never widely supported despite actually making it into a few RFCs. Hrmm. (Disclaimer: Namecast (http://www.namecast.net http://www.namecast.net) supports ALIAS records as well, so I have an abnormal interest in what was otherwise a small part of the article.)
- giovannibajo1 13y agoThe worst part of ALIAS is that traditional hosted DNS servers don't support it, as far as I can see. Usually CDN providers do handle static IP addresses at the zone apex somehow, but in this case it seems they don't.
- zimbatm 13y agoIt's not a real record in the sense that it's never sent to the client so it doesn't really matter no ? It's just a convenient way to say "return an A record or that fqdn" on the configuration side.
- namecast 13y agoYeah, you should never see anything like "IN ALIAS" in the output of dig, for example, and getaddrinfo(3) wouldn't know what to do with that sort of record. It's all internal to the authoritative NS. ...which is a bummer, because doing this adds a weird sort of black box step in the DNS resolution chain between client and server. It makes troubleshooting DNS problems not so much fun.
- zimbatm 13y agoAgreed and the option is often displayed along other real DNS records names adding to the confusion if you're not familiar with DNS systems.
- harryh 13y agoWhat's an ALIAS record? I don't even see that here: https://en.wikipedia.org/wiki/List_of_DNS_record_types https://en.wikipedia.org/wiki/List_of_DNS_record_types
- chc 13y agoTo my understanding, it's a new, nonstandard thing invented by DNSimple that lets you specify your base domain as a reference to another domain — basically, it's like a CNAME where an A record would normally be required.
- namecast 13y agoYep. ALIAS records exist basically to get around the CNAME restriction introduced in RFC 1034. Basically, with a CNAME, you can't have any other qtypes for the leaf that you're on. (I'll explain what that means...) For example: If you set up subdomain.yourdomain.com to be an A record to to 10.0.1.1, you can also set up additional A records, AAAA records for IPv6, and even MX and NS records for subdomain.yourdomain.com. If you set up subdomain.yourdomain.com to be a CNAME, you can't have any other record types for subdomain.yourdomain.com. ALIAS records exist because you can't CNAME your root record - the root of your domain has to have at the very least an SOA record, and NS records are going to be needed for the domain to actually resolve. Since those record types exist at the root of your domain, and since CNAME's can't coexist with other record types, you can't use CNAME's at the root of your domain. Accordingly, the ALIAS record really is only useful to redirect the root apex of your domain somewhere else. (Just my two cents.)
- brymaster 13y agoSo is this blog incorrect in stating that you can simply change CNAME at your domain's registrar and still take advantage of github's CDN for "apex" domains? http://davidensinger.com/2013/03/setting-the-dns-for-github-pages-on-namecheap/ http://davidensinger.com/2013/03/setting-the-dns-for-github-... Github stated that if you use an "apex" domain your only option is to set A records to their IP but that doesn't seem right.
- abritishguy 13y ago"Same dos mitigation as GitHub.com" I should expect some downtime then
- scottbruin 13y agoI'm not entirely sure why they say that since www.github.com is using Github's own BGP IP space whereas the CDN they're talking about is Fastly. In other words, github.com may not be on Fastly unless Fastly has built out separate infrastructure for them with Github's IP space.
- nodesocket 13y agoPlease GitHub add https (with SPDY) support. Willing to pay for this.
- Sir_Cmpwn 13y agoMediaCrush hosts our blog [1] on GitHub pages, and we proxy it [2] with nginx to add SSL. [1] https://blog.mediacru.sh https://blog.mediacru.sh [2] https://github.com/MediaCrush/MediaCrush/blob/master/config/nginx.conf#L90 https://github.com/MediaCrush/MediaCrush/blob/master/config/... And the pages: https://github.com/MediaCrush/mediacrush.github.io https://github.com/MediaCrush/mediacrush.github.io
- nilved 13y agoWhy not just host it yourself then? You can get precompiled gzip and sane caching. The only reason I can think of to use GitHub Pages is not wanting to pay for a proper host.
- Sir_Cmpwn 13y agoTwo reasons: Deployment. It's easy as pie to deploy GitHub pages. Open-source. MediaCrush itself [1] is open-source, and we wanted the blog to be open and well tuned for pull requests and such. [1] https://github.com/MediaCrush/MediaCrush https://github.com/MediaCrush/MediaCrush
- nilved 13y agoHaving used GitHub Pages, S3 and my own VPS for hosting, a homebuilt host is by far the easiest. rsync is easier to use than git, which is a million times easier to use than S3. I might go so far as to say that storing compiled HTML on git is an antipattern, but that isn't to say that you can't mirror the generator and posts on GitHub.
- Sir_Cmpwn 13y agoWell, I would use git anyway because I want it to be under version control. I'm intimately familiar with git and I consider it no harder than rsync. There are so many benefits offered by version control that I wouldn't dream of doing it with something like rsync alone.
- Spiritus 13y ago>Our plans start at $8/month. Register .com for $14, .me for $24, and .co.uk for $8 I don't get services like DNSimple. Why would I pay monthly just be able to pay to register domains? What am I missing?
- namecast 13y agoSome users are fine with using their registrar's domain servers, others prefer a dedicated DNS provider to escape the constant barrage of upselling (looking at you Register.com and GoDaddy), or to get access to advanced features (read: native IPv6, anycast, geographic targeting, that sort of thing. DNSimple has a RESTful API and an iPhone app, for example), or - mostly - to get better support than registrars are typically known for providing. (Go ahead and try to find someone at Enom who wants to talk to you about updating glue records. I'll wait.) ^^This is sort of like saying, "I don't get services like Dropbox. Rsync works fine for me." If you don't think you need an UltraDNS/Dynect/DNSimple type of service, then you probably don't, and there's nothing wrong with that. (P.S: I'm totally biased, I'm responsible for https://www.namecast.net https://www.namecast.net, a GitHub + DNS mashup).
- bgentry 13y agoThe monthly $8 plan is for DNS service. The other fees listed are for yearly domain registrations. The language could certainly be more clear around that.
- tombrossman 13y agoI'm going to risk looking stupid here but what is the preferred DNS setup then, to make sure both example.com and www.example.com resolve to a GitHub Page at the custom URL www.example.com? The way I read their documentation I set only a CNAME for www -> username.github.io. Does this mean I set no A record at all for the domain, to make sure I get the benefit of the CDN? If yes, how do I ensure requests for example.com resolve to www.example.com?
- lmm 13y agoAIUI: If your provider supports ALIAS then you set an ALIAS for example.com in addition to the CNAME for www. If your provider doesn't then you'll have to set an A for example.com to point to their IP, and the CDN won't work for example.com.
- speleding 13y agoThe preferred way is to choose either www.example.com or example.com and let only one of them resolve, while the other should issue a 301 ("Moved permanently") back to the one that resolves. The easier one to set up is to prefer the www version since it can be done with a simple CNAME and many DNS providers will offer a free automatic 301 forward for the non-www version. (But tastes differ on whether the non-www version looks better.) Letting both versions resolve would give issues with Google indexing multiple versions of the same page, and reduces the ability to cache properly.
- tombrossman 13y agoI'm looking to park a few low-traffic charity sites there and 'Set it and forget it' (like Ron Popeil). I think having both with and without the www working is a higher priority than SEO, so I'll have to compromise and set A records for example.com and CNAME for www. If anyone figures out a better practice please leave a comment. My preference is no www (with www 301-ing) plus the CDN benefit, but this probably isn't possible.
- seaghost 13y ago"Faster" is true, but "more awesome" is marketing.
- slattery 13y agoWhy would I ever pay for CDN service, now that GitHub Pages provides CDN service for free? Am I missing something? We can all use Fastly for free now...
- lectrick 13y agoI am a little surprised that it took them this long to go to a CDN, actually
- ksec 13y agoThey used different CDN previously ( MaxCDN i believed it was ), now they changed to Fastly.