TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Web App Environment Recommendation?

1 pointsby JoeOfTexasover 3 years ago
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 comments

brimstedtover 3 years ago
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 未加载
bg24over 3 years ago
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.
jastrover 3 years ago
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 未加载