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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Web App Environment Recommendation?

1 点作者 JoeOfTexas超过 3 年前
I am working on a webapp, that needs this environment setup:<p>-------------------------------------<p>Public Routes:<p>- API (nodejs &#x2F; 1+ instances)<p>- WebSockets (nodejs &#x2F; 1+ instances)<p>- Object Storage (proxy)<p>Private Routes:<p>- Redis (docker &#x2F; cluster)<p>- RabbitMQ (docker &#x2F; cluster)<p>- MySQL (standalone &#x2F; cluster)<p>Hidden (connects to Public&#x2F;Private routes):<p>- worker1 (nodejs)<p>- worker2 (nodejs)<p>- worker3 (nodejs)<p>-------------------------------------<p>In researching environments for hosting, I found 3 options:<p>1) VPS&#x2F;Docker for each service<p>2) All services in a single Bare metal server<p>3) Kubernetes<p>There are downsides to each. But, looking at costs, bare metal server would be the most economical, and Kubernetes is way outside my budget.<p>My budget is roughly $100, and my time is just as limited.<p>The webapp is scale ready, but that&#x27;s not very important if I have no users on launch day.<p>What environment recommendations do you have that would let me run such a configuration for my webapp?

3 条评论

brimstedt超过 3 年前
Packaging your applications as docker images from the beginning requires little extra effort, but gives you a number of deployment options and if you grow it will be easy to move to eg. k8s.<p>Setup your servers using ansible, puppet or similar to lower the requirements for redundancy and backups (if you cant take a little downtime in case of accident)<p>If you&#x27;re Europe based, one suggestion is to get two ~$50 servers from Hetzner and run all services in plain docker. (i.e. two servers for redundancy)<p>Depending on your setup and requirements, it might even be enough to have one server + a cheap CDN and in that case you might even be able to run the server at home or a friends office.
评论 #29546503 未加载
bg24超过 3 年前
If you add up the cpu&#x2F;memory requirements for redis, rabbitmq, mysql etc., that itself adds up to a beefy machine. Then the network traffic from the users.<p>Better to package&#x2F;run these as docker components on 2 beefy VM&#x27;s w&#x2F; a LB from a provider like DigitalOcean, Vultr, Linode or Hetzner. You can pick up AWS etc, but be mindful of all the costs that add up.<p>Kubernetes is a no-no unless you have some level of proficiency in kubernetes, or are willing to invest the time.
jastr超过 3 年前
This is quite a bit of infrastructure for an app that hasn&#x27;t launched yet. If it&#x27;s not too late, consider simplifying by removing RabbitMQ or Redis. Perhaps even getting rid of both, and only using MySQL. Maybe your workers could become cron-jobs or threads.<p>For hosting, consider Heroku and Heroku add-ons for MySQL, Redis, and RabbitMQ. You could run workers in Heroku as well.<p>It would be possible to run this entirely in a VPS as well and fairly straightforward. I&#x27;ve also had success running the web app (with postgres and redis) in Heroku but the workers on a VPS.
评论 #29546263 未加载