4 ms·
Hmm, as someone who is about to move from using a webserver to hosting our single page app on S3 you may have just convinced me not to. What exactly are the be
by tbrock 10y ago
Hmm, as someone who is about to move from using a webserver to hosting our single page app on S3 you may have just convinced me not to.
What exactly are the benefits over simply setting up nginx if not simplicity? Yeah, it's great to just serve the asset from s3 but the complexity of what you just described negates it almost entirely.
- Alex3917 10y ago> What exactly are the benefits over simply setting up nginx if not simplicity? We weren't fully aware of these limitations when we decided to host our site on S3. Had we been, we may have just used nginx. There are obviously a ton of benefits to S3 and Cloudfront, it's just than in practice you can't really get them if you need Google to index your site. And while Google claims they can now execute javascript and include async content, in practice this isn't true for any real Angular or React site. And even if every search engine were to magically execute js correctly, you'd still need to prerender your site in order for Facebook and Twitter to populate the preview cards for your site with the proper headline, summary, and image.
- scrollaway 10y agoYou should keep in mind that S3 really is an object storage. It's named as such, advertised as such, priced as such and the limitations you're hitting are because it's built as such. It does work if you want to host a static site, and it's nice that they offer a bunch of extra niceties to help make those work... but expecting things like user-agent-specific redirects is a bit much for what's essentially a filesystem.
- mgkimsal 10y agoAmen! Have been baffled by the urge to move stuff to S3 for app hosting. I understand the convenience (sort of) and the scalability aspects (mostly) but you seem to lose loads of functionality.
- toomuchtodo 10y agoIt works for anything static, but anything dynamic needs to go on a server or Lambda (or possibly the API gateway).
- Alex3917 10y agoI mean they let you put S3 behind Cloudfront with a TLS cert. Having read through all the documentation, hundreds of blog posts, etc., I've seen absolutely nothing that indicates that S3 + Cloudfront isn't meant for serious web hosting.
- gaadd33 10y agoDo Angular sites seem to render correctly in Google Webmaster tools but they aren't actually indexed properly unless you have pre-rendered pages served? I'm curious since when I ask Google to index a specific page it shows everything properly loaded/rendered and I was under the impression that was also being indexed.
- dx034 10y agoI don't really understand the advantage. Getting a small vps with nginx is fast to set up, needs very little maintenance and can handle a large amount of traffic (requesting static pages). Can't really see how S3 can be cheaper or easier. Yes it gives some scalability, but so do many cloud providers. Digitalocean and Vultr both have SSD storage that you can attach to VMs. The speed I've seen is fast enough to easily saturate the bandwidth. Of course you'd need to scale up when you need bandwidth of more than 100mbit, but this is still cheaper than paying for AWS bandwidth and servers.
- sscarduzio 10y agoUsing S3 as a web server means: managed reliability, scalability, security, maintenance, updates, https, and price efficiency (pay only if pages are visited) Cloudfront or API gateway help you integrating with non static resources. Bandwidth price is identical with ec2. With lambda out there, for me ec2 is just legacy.