TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How did you learn about the design/architecture of backend systems ?

58 点作者 yr将近 15 年前
I'm interested in learning the backend systems of Facebook, Amazon, Google, Twitter, Loopt or any other startups. I'm mainly interested in design/architecture and scaling.

6 条评论

thejo将近 15 年前
For web applications, understanding the concept of state and managing it takes you a long way towards building a scalable system (on a related note, any time spent really understanding HTTP is time well spent). It's very useful to read books, presentations and war stories, but for me, reading code in applications designed for scale was far more important. I strongly recommend the Amazon Dynamo paper. Read and think about the design decisions they made. Then go read the Cassandra code for the actual implementation (pretty much, in terms of the big ideas, at least as it was back in 2008).<p>As with any learning it's very hard to truly grok the importance of loose coupling, service oriented architecture, embedding statelessness in the architecture etc., unless you try to build something, get it wrong and then fix it. So, the very best way to learn would be to put yourself in a place where you get an opportunity to do that.
pkghost将近 15 年前
My answer comes from the perspective of a recent grad who has spent a year at a mid-sized SF social gaming company, working only recently on the back-end (i.e., not a scaling expert).<p>A few things I've learned w/respect to scaling in my context:<p>- I/O is likely to be your bottleneck, so design your db well and anticipate splitting it across multiple machines (and what that means for your access logic)<p>- don't spawn a new thread for every request (a la apache)<p>- keep your services simple (perhaps: one for handling web requests, one for data access, one for caching, one for your payment system) and their relationships even simpler (one hop max from RPC caller to callee)<p>- cache like a hoarder<p>- find/write an efficient serializer for RPCs between services<p>What helped me get a grip on this stuff was sitting down with an architect who has done it successfully multiple times. I asked for an elevator pitch description of scaled web architectures, and then ask him about his failures. Voila bullet points.
评论 #1510927 未加载
评论 #1511401 未加载
burel将近 15 年前
here an article about various techniques to make github (a rails app) fast:<p><a href="http://github.com/blog/530-how-we-made-github-fast" rel="nofollow">http://github.com/blog/530-how-we-made-github-fast</a><p>very interesting but also full of intimidating stuff:<p>"[...] For requests to the main website, the load balancer ships your request off to one of the four frontend machines. Each of these is an 8 core, 16GB RAM bare metal server. Their names are fe1, …, fe4. Nginx accepts the connection and sends it to a Unix domain socket upon which sixteen Unicorn worker processes are selecting. One of these workers grabs the request and runs the Rails code necessary to fulfill it. [...]"<p>I think they know what they are doing ...
mindcrime将近 15 年前
I'm still not the world's foremost expert, but what I do know I've learned through a combination of trial and error, reading books (I'll edit this later and put in a couple of specific titles), reading stuff on the 'Net and classes I took in school (I did a degree in "High Performance Computing" which had some useful aspects to it).<p>A good place to start, if you're not already familiar with it, is High Scalability: <a href="http://highscalability.com/" rel="nofollow">http://highscalability.com/</a><p>Edit: book recommendations:<p>Scalable Internet Architectures -<p><a href="http://www.amazon.com/Scalable-Internet-Architectures-Theo-Schlossnagle/dp/067232699X" rel="nofollow">http://www.amazon.com/Scalable-Internet-Architectures-Theo-S...</a><p>Linux Clustering - Building and Maintaining Linux Clusters - <a href="http://www.amazon.com/Linux-Clustering-Building-Maintaining-Clusters/dp/1578702747/ref=sr_1_1?ie=UTF8&#38;s=books&#38;qid=1279001787&#38;sr=1-1" rel="nofollow">http://www.amazon.com/Linux-Clustering-Building-Maintaining-...</a><p>High Performance Linux Clusters - <a href="http://www.amazon.com/Performance-Clusters-OpenMosix-Nutshell-Handbooks/dp/0596005709/ref=sr_1_2?ie=UTF8&#38;s=books&#38;qid=1279001787&#38;sr=1-2" rel="nofollow">http://www.amazon.com/Performance-Clusters-OpenMosix-Nutshel...</a><p>Linux Enterprise Cluster - <a href="http://www.amazon.com/Linux-Enterprise-Cluster-Available-Commodity/dp/1593270364/ref=sr_1_3?ie=UTF8&#38;s=books&#38;qid=1279001787&#38;sr=1-3" rel="nofollow">http://www.amazon.com/Linux-Enterprise-Cluster-Available-Com...</a><p>Java Message Service - <a href="http://www.amazon.com/Java-Message-Service-Mark-Richards/dp/0596522045/ref=sr_1_1?ie=UTF8&#38;s=books&#38;qid=1279001930&#38;sr=1-1" rel="nofollow">http://www.amazon.com/Java-Message-Service-Mark-Richards/dp/...</a><p>Java Message Service API Tutorial and Reference - <a href="http://www.amazon.com/Java-Message-Service-Tutorial-Reference/dp/0201784726/ref=sr_1_4?ie=UTF8&#38;s=books&#38;qid=1279001995&#38;sr=1-4" rel="nofollow">http://www.amazon.com/Java-Message-Service-Tutorial-Referenc...</a><p>Enterprise JMS Programming - <a href="http://www.amazon.com/Enterprise-JMS-Programming-Professional-Mindware/dp/0764548972/ref=pd_cp_b_2" rel="nofollow">http://www.amazon.com/Enterprise-JMS-Programming-Professiona...</a><p>Hadoop: The Definitive Guide - <a href="http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/0596521979/ref=sr_1_1?ie=UTF8&#38;s=books&#38;qid=1279002071&#38;sr=1-1" rel="nofollow">http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/0...</a><p>Pro Hadoop - <a href="http://www.amazon.com/Pro-Hadoop-Jason-Venner/dp/1430219424/ref=pd_sim_b_2" rel="nofollow">http://www.amazon.com/Pro-Hadoop-Jason-Venner/dp/1430219424/...</a><p>Wikipedia:<p><a href="http://en.wikipedia.org/wiki/Shared_nothing_architecture" rel="nofollow">http://en.wikipedia.org/wiki/Shared_nothing_architecture</a><p><a href="http://en.wikipedia.org/wiki/Shard_%28database_architecture%29" rel="nofollow">http://en.wikipedia.org/wiki/Shard_%28database_architecture%...</a><p><a href="http://en.wikipedia.org/wiki/Publish/subscribe" rel="nofollow">http://en.wikipedia.org/wiki/Publish/subscribe</a><p>It's important to understand the difference between vertical scaling and horizontal scaling. Horizontal is very en vogue these days, especially with commodity hardware. Why? Because you can add power incrementally without spending tons of money upfront, and without requiring a "forklift upgrade" (that is a reference to needing a forklift to bring in a new mainframe or minicomputer). This is a pretty good article on the topic:<p><a href="http://www.scalingout.com/2007/10/vertical-scaling-vs-horizontal-scaling.html" rel="nofollow">http://www.scalingout.com/2007/10/vertical-scaling-vs-horizo...</a><p>As popular as horizontal scaling is, don't ignore the possibilities of going to bigger hardware though. It has it's own advantages, especially when you start talking about physical floor space to store servers.<p>Of course "cloud computing" changes some of this, both by making it cheap and easy to add VPS's to scale horizontally, or by making it possible (sometimes) to easily add more processing power, RAM, etc. to your "server." Read up on Xen, KVM, EC2, etc. for more on that whole deal.
评论 #1511380 未加载
评论 #1511324 未加载
评论 #1573687 未加载
评论 #1513611 未加载
simonw将近 15 年前
I found Cal Henderson's book "Building Scalable Websites" (which describes pretty much everything he learnt while scaling Flickr) incredibly useful.
jarsj将近 15 年前
Go work at Google. Even if you have to pay for it.