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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How, if at all, do you build infrastructure for side projects to scale?

12 点作者 relaunched超过 10 年前
I am considering using the free tier on one of the major cloud service providers and wanted to get thoughts on if and how people build their infrastructure for side projects. Do you route your DNS directly to your main instance and keep both your database and middleware there (it's simple to setup, but doesn't really scale). Or, do you invest time setting up a load balancer, redundant databases in more than one zone, a middleware instance in more than one zone, remote code execution for spinning up new instances, etc.

7 条评论

Oculus超过 10 年前
This all depends on the goals of your side project. If the goal is something other then learning how to set up infrastructure, then deploy your app on Heroku. You get most of the difficult problems dealt with and only have to focus on a couple configurations. Yes, admittedly Heroku is pricey when you start to scale up, but keep in mind that your time isn&#x27;t free and that you&#x27;d need a considerable amount of traffic before it makes sense to spend a lot of time on properly setting up your app to scale.<p>On the other hand, if you want to learn how properly design a web application to scale, I&#x27;d suggest to get a couple boxes on DO[1]. This[2] article describes the common design for 99% of applications on the web (The last 1% is reserved for companies that have achieved enough traffic to justify hiring their own ops team). Finally, I&#x27;d suggest you read through this[3] slide deck. It goes through the steps of scaling up your application from one server to a cluster of machines.<p>1 - <a href="https://www.digitalocean.com/" rel="nofollow">https:&#x2F;&#x2F;www.digitalocean.com&#x2F;</a><p>2 - <a href="https://www.digitalocean.com/community/tutorials/5-common-server-setups-for-your-web-application#example-combining-the-concepts" rel="nofollow">https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;5-common-se...</a><p>3 - <a href="https://speakerdeck.com/modulus/planning-for-the-horizontal-scaling-node-dot-js-applications" rel="nofollow">https:&#x2F;&#x2F;speakerdeck.com&#x2F;modulus&#x2F;planning-for-the-horizontal-...</a>
tlubinski超过 10 年前
All on one box until it gets some traction. But I always setup an external monitoring (e.g. pingdom) service to get a notification, when something is down and a cronjob for daily (db-)backup.<p>Scaling steps with traction:<p>1.) dedicated server for DB<p>2.) loadbalancer (AWS ELB) &amp; 2nd app-server<p>3.) scripting server mgmt (AWS OpsWorks, chef, puppet, ...)<p>4.) adding missing server roles (e.g. caching through memcache) to scripts<p>5.) deployment, up-&#x2F;down-scaling with button clicks<p>6.) Slave-DB (more for ongoing backup and fail-over than for read-distribution)<p>7.) if you don&#x27;t use AWS ELB don&#x27;t forget to make sure the LB is not your single point of failure<p>Usually I have more than 1,000 registered users before I start with scaling step 1.
MalcolmDiggs超过 10 年前
For a true side project (as in: I&#x27;m probably going to forget about it in a couple weeks and let it fade away), I don&#x27;t bother with any of that.<p>If it&#x27;s a professional project in any sense (as in: something I&#x27;m being paid to do) I&#x27;ll at least route the DNS to a load balancer, and I&#x27;ll use some kind of hosted RDS or NoSQL service for the DB. That&#x27;s kind of the bare minimum effort (just in case the client is right about the product getting a million hits on the first day...).<p>But for 99% of side-projects, you can build and refactor for scaling concerns <i>after</i> you&#x27;ve done practically everything else. Scaling is the ultimate &quot;Champagne Problem&quot;.
ishener超过 10 年前
For side projects I have found App Engine to be the best choice. The free quota gives you time and space to develop and explore if this project is of any worth. And if suddenly there&#x27;s an explosion you really don&#x27;t need to do anything other than enable billing... (of course, giving that the design of the model is scalable)
hashtag超过 10 年前
None of that until it does scale. Speaking from prior experience of previously running on our own server setup (a long time ago before cloud and hosting were the norm, after scaling on AWS, and to current stuff.<p>Worry about server setup when you have those problems or otherwise you might be over optimizing the wrong things.
nyddle超过 10 年前
I use Heroku. You can use it for free and scale with one click if your project gets off the ground (or you are hitting HN front page). The downside is that Heroku gets very expensive as you add more resources.
walterbell超过 10 年前
You can host static content on github pages, which includes a CDN.