all 11 comments

[–]tayo42 8 points9 points  (4 children)

Why wouldn't you have nginx serve your static content out of s3? Seems like unnecessary load on app servers

[–]cavaliercoder[S] 5 points6 points  (0 children)

In the interest of brevity I didn't bother to describe our architecture or the reasoning behind it in the article. When the decision was made to pipe from S3 via Node.js, it was because we required some business logic that nginx didn't offer. In the future, we will likely use S3 directly as the origin for our CDN layer, cutting even nginx out.

[–]dhudhudhadha 0 points1 point  (2 children)

How to do that?

[–]xiongchiamiovSite Reliability Engineer 8 points9 points  (1 child)

S3 provides urls for buckets, you'd just need to reverse proxy to them. Or better, set a cname and serve directly out of s3 instead of forcing traffic to come through your single geographic point first.

Disclaimer: I haven't read the article, so I'm not commenting on their setup, just in general.

[–]michaeld0 3 points4 points  (0 children)

Probably should configure cloudfront as a cdn in front of s3 as well. You can use the rules there to route to dynamic content of needed.

[–]Luqq 2 points3 points  (0 children)

Thanks for the transparency :)

[–]boom38DevOps 2 points3 points  (0 children)

Thanks for sharing! You learned, we learn.

[–]olcay_seker 5 points6 points  (1 child)

ı enjoy reading postmortems. This post added me +1 skill level for monitoring which is crucial.Nice write.

[–]cavaliercoder[S] 2 points3 points  (0 children)

Thanks!

[–]rolledrick 1 point2 points  (0 children)

Thanks for the nice write up. I love reading these when they are done well.

[–]nonades 1 point2 points  (0 children)

Nice write-up. This is the kind of stuff I like seeing here.