5 ms·
Google has quietly launched a CDN
- akurilin 11y agoI couldn't quite find this, but what domain are these files going to be served from?
- dorfsmay 11y agoUsually you created CNAMEs from your domain to your CDN's.
- hayksaakian 11y agoIs it best practice to use a separate domain for CDN because of cookies? Eg: examplecdn.com instead of cdn.example.com
- dorfsmay 11y agoIf you trust your CDN, then no, you have less issues if you use the same domain as the one you use for your APIs.
- valverde 11y agoIt's not about the security of the cookies, it's about the bandwidth you save by having a separate domain for static content, because the client does not have to transmit the cookies for each request.
- dogma1138 11y agoIf you issue cookies to www.example.com your browser will not send them to cdn.example.com unless it's very poorly written. Each cookie has a path set to it and browsers will obey it, this includes inter-domain paths and restrictions. If you want you can go even further and assign a cookie to a specific URI path so the cookie will only be issues to pages that fall under www.example.com/private/ for example if that's what the path is set too.
- valverde 11y agoThere are many high profile websites that use the cookieless domain approach: Google, Facebook, and Reddit off the top of my head. I wouldn't say they are poorly written - it's more of a design decision to have cookies in the top-level domain.
- dogma1138 11y agoI didn't say the sites would be poorly written, the browsers would be if they do not obey the cookie set domain and set path restrictions. And the fact that big sites use it doesn't mean that they were "well written", Google mostly issues only tracking cookies for wildcard domains like .google.com as far as private cookies go they usually would be issued for each domain individually (play.google.com etc.). Issuing authentication cookies to wildcard domains and root paths isn't advisable even if some big sites do it doesn't mean you should take it as an example :) P.S. I really hate "Google and Facebook are doing it" as an example, even if they are you most likely aren't either of them, not even close they have quite different considerations than you. Even when they do things which aren't best practice or common sense it doesn't mean that you should decide to take the same path, both Google and Facebook have plethora of ways to ensure account security including quite decent activity heuristics, they have many ways of detecting attacks such as XSS, and they have most likely a much better process of ensuring that vulnerable pages do not go live or do so quite rarely. Unless you can say the same then do not use them as an excuse, you do not need to issue cookies to wildcard domains and you can restrict them to certain paths, and you better do so because you do not have many other mitigating controls in place as the big players do.
- valverde 11y agoAh, sorry, I misread your comment. Indeed, a browser that doesn't respect cross-domain restrictions is a poorly written browser. My point still stands, though: the point of cookieless domains is not security, but bandwidth. And there are legitimate reasons to have top-level domain cookies - sharing authentication state between subdomains is a common example - which would prevent a subdomain from being used as a CDN, without receiving cookies.
- rybosome 11y agoYou should host user content (specifically JavaScript files) on a separate domain though, otherwise you put user cookies at risk.
- ejcx 11y agoThere are many reasons. One old reason is because your browser will only make so many concurrent Connections to one domain, so this spreads the load. I'm not sure how many concurrent resources they will download nowadays though. Another big one is security of cookies and data, like you mentioned. Most of the time CDNs will return an access allow origin * header. This is literally the worst thing you can do for security of your users if they have a secret cookie. A different domain minimizes the risk of making a mistake to zero since it is completely separate, and is easier since you don't need any nginx funny business proxy passing to a server with static assets with a location directive. The allow access origin * is a death sentence that breaks same origin policy if you make a mistake.
- dogma1138 11y agoCookies should be secured using the domain and path attributes. You share quite a bit of things with your CDN quite often various API keys, as well as SSL certificates unless you do not serve your main content over SSL in the first place. Most (I'm pretty sure all) CDN's give you the ability to set your own CORS policy if you see a CDN on cdn.example.com returns allow origin * then it means it's user did not set the CORS headers properly. Also the CDN can return allow allow and it still will not make a difference if you issue your cookies to the proper domain and path e.g. www.example.com/account if that's the domain and path there is no way a modern browser will attach that request to anything which doesn't sit on www.example.com and is located under /account. If you issue your auth cookies to .example.com and the / path don't be surprised why ever XSS and other client side attacks end up compromising your users, you can have 100 XSS's in your site, you can have a shitty CORS policy and if your cookies are issued and restricted properly it's more likely than not that those vuln's could not be leveraged to compromised your users' sessions (not through a classic session theft that is).
- ejcx 11y agoI'm not sure what your comment adds and if I'm reading it right there is a lot of information that's just blatantly wrong I cant discuss your whole comment because it's long and I'm on a phone. "If you issue your auth cookies to .example.com and the / path don't be surprised why ever XSS and other client side attacks end up compromising your users, you can have 100 XSS's in your site, you can have a shitty CORS policy and if your cookies are issued and restricted properly it's more likely than not that those vuln's could not be leveraged to compromised your users' sessions (not through a classic session theft that is)." There is so much wrong about this paragraph. Who needs session theft in the scenario you provide.. If you have 100s of XSS on your site and a bad CORs policy there is a lot an attacker can do... Data exfiltration is very easy if you can execute js and so are things like XSRF. A correct path and domain setting for cookies is important but web security is a lot harder than your acting like it is..
- hayksaakian 11y agoIs it best practice to use a separate domain for CDN because of cookies? Eg: examplecdn.com instead of cdn.example.com
- bajsejohannes 11y agos/Akamai competitor/CDN
- dang 11y agoDone.
- cagenut 11y agoNot to rag on the offering, but the headline is just not right. This is a CloudFront competitor not an Akamai competitor. Its a very rigid barebones product at a low margin via self-serv tooling.
- mkj 11y agoGoogle's reach of "Edge Caches" seems closer to Akamai's than CloudFront's though - lots of indivdual ISPs have them.
- forcer 11y agoThere is big difference in GGC edges and CDN they "announced" 800+ vs 30. Most likely they will keep the GGC cache just for google services like Youtube and wont offer it through their public CDN. (The 800+ is just estimate based on research we did recently, Google does not reveal publicly how many edges on GGC they have , more here http://blog.speedchecker.xyz/2015/11/30/demystifying-google-global-cache/ http://blog.speedchecker.xyz/2015/11/30/demystifying-google-... )
- jdub 11y agoI have pretty strong doubts that the Google Cloud Platform team would have convinced the broader organisation to host customer stuff on their mission critical caches. As I understand it, there's not a lot of dogfooding (let alone cooperation!) between GCP and Google.
- tomschlick 11y agoYes but if they already have agreements with those ISPs its easy enough for them to throw a few extra serves/racks in their data centers dedicated for GCP
- jpatokal 11y agoGreat big slabs of Google Cloud Platform are opened-up versions of formerly-internal Google tech: BigQuery, BigTable, Cloud Storage, Datastore, etc.
- 11y ago
- lopatin 11y agoI'm sure it's a great service. I found it a little funny that this is a CDN that is "not [yet] recommended for production use".
- illumen 11y agoIt's also kind of funny that it's available in limited regions. Alpha, is what the Article says. Which means not ready, and changing in development quite a lot.
- boundlessdreamz 11y agoLimited only to service hosted in GCE unlike cloudfront which is a huge limitation. My guess is that there are more non-aws cloudfront customers than aws ones
- SimeVidas 11y agoIs this the CDN used for AMP pages?
- nikolay 11y agoArticles like these tell a lot about the level of competence of the common journos. There are many CDNs and there's Akamai. Huge difference! This is not even a Fastly competitor!
- joshmn 11y agoWanna hear about the journalist who said that WordPress wasn't capable of handling 50k requests? And that proper caching is useless? And that static site generators were the way to go because it couldn't? And that caching doesn't make things static? And that jekyll is designed to be used on windows, but not the "500 gems" it installs? I digress.
- tszming 11y agoThe issue with Google launching these services is you don't know when they was/will be blocked in China. Not really a global competitor to CloudFront/Azure IMHO.
- wernerb 11y agoCloudfront is not available in China. We had to implement a small CDN for a large ecommerce website. What we did was use geo-ip route 53 and route chinese ips to load balanced nginx instances caching the cloudfront cdn. What compounds the problem with China is that the chinese are very much used to requesting an english language variant of the webstore as its often cheaper. This circumvents the CDN however as all stateful requests are routed to foreign servers making their experience really slow. Also there's the chinese web license process that you have to go through to even host a website in china.
- tszming 11y agoI've a few instances in aliyun (alibaba cloud) to monitor the traffic from time to time, Cloudfront works for me now, while googleapis.com is blocked. I cannot convince myself not to use a politically neutral company (or China friendly) like AWS, Azure.. when I am considering the CDN service.
- wernerb 11y agoOh yeah its accessable from China. But I meant that there is no cloudfront edge region in China so chinese customers must cross the firewall and it is really really slow for them.
- buro9 11y agoThis is not an Akamai competitor. You'll know an Akamai competitor when you see it as it will handle video and large files. This Google offering is limited to files below 4MB, which precludes most video. Really this is a CloudFront competitor, but even then... it is only offering a very basic set of features to do with the caching, rather than anything else CloudFront is doing. Further, the logic of what is cached is very basic: https://cloud.google.com/compute/docs/load-balancing/http/cdn#whichcontentiscached https://cloud.google.com/compute/docs/load-balancing/http/cd... This all serves one goal: Reduce your Google bill by caching more and preventing it reach the server. How it does this is extremely basic, and it has limitations (check the cache invalidation gotchas). The best way to reduce your Google, Amazon S3, and other bills remains to use a CDN in front of it that is cheaper than the storage behind it. The basic features of that you should care about is how easy is it get stuff into cache, serve it over https:// https:// and invalidate it at will. Advanced features should look at DDoS costs (are you paying when you get attacked?), whether there are PoPs/edges where your market is, and then anything specific to your product, though you've usually made a selection before you get this far.