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.

Deployment and infrastructure for a bootstrapped webapp with 150k monthly visits

252 pointsby wolfspawover 2 years ago

33 comments

ksbrooksjrover 2 years ago
Great write-up. Note that the author is only serving 70 requests per second at peak with 15 thousand registered users and 3 thousand in revenue per month. This just shows that you don&#x27;t always have to plan to scale to thousands (or millions) of requests per second.<p>This blue-green deployment workflow reminds me of a similar setup used by the creator of SongRender[1], which I found about via the running in production podcast[2]. One thing to be aware of with smaller VPS providers like Linode, DO, and Vultr is that they charge per hour rather than per second. So if you boot up a new VM every time you deploy you&#x27;re charged for a full hour each time.<p>[1] <a href="https:&#x2F;&#x2F;jake.nyc&#x2F;words&#x2F;bluegreen-deploys-and-immutable-infrastructure-with-terraform&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jake.nyc&#x2F;words&#x2F;bluegreen-deploys-and-immutable-infra...</a><p>[2] <a href="https:&#x2F;&#x2F;runninginproduction.com&#x2F;podcast&#x2F;83-songrender-lets-you-create-audio-visualizer-videos-from-audio-clips" rel="nofollow">https:&#x2F;&#x2F;runninginproduction.com&#x2F;podcast&#x2F;83-songrender-lets-y...</a>
ed25519FUUUover 2 years ago
I think we can safely put docker images (not k8s) in the &quot;boring technology&quot; category now. You don&#x27;t need k8s or anything really. I like docker-compose because it restarts containers. Doesn&#x27;t need to be fancy.
评论 #32988452 未加载
评论 #32990081 未加载
评论 #32988087 未加载
评论 #32988621 未加载
评论 #32987894 未加载
评论 #32993365 未加载
评论 #32988569 未加载
评论 #32990779 未加载
londons_exploreover 2 years ago
When you&#x27;re a 1 man show, you need to both save your own time, and compute costs.<p>To save your time, use the simplest thing you know how to use. Whatever you can set up easily and gets you serving a hello world on the internet.<p>To save compute, just don&#x27;t do stupid things. In particular, you should consider what happens if this project <i>isn&#x27;t</i> a runaway success. One day, you might want to leave it running in &#x27;maintenance mode&#x27; with just a few thousand users. For that, you&#x27;d prefer to be running on a $10&#x2F;month VPS than a $2000&#x2F;month cloud setup which is going to require constant migrations etc.<p>Things like automatic failover and loadbalancing are seldom required for 1-man shows - the failure rate of the cloud providers hardware will be much lower than your own failure rate because you screwed up or were unavailable for some reason.
nlstitchover 2 years ago
Im secretly a fan of the boring tech statement. Sometimes all of the new containerization and microservice paradigms just feel like an excuse to overengineer everything. Running solo and starting from scratch (no code, no infra, no cloud subscriptions) means you&#x27;ll have to simplify and reduce moving parts.
评论 #32988491 未加载
评论 #33014560 未加载
评论 #32988114 未加载
评论 #32990753 未加载
moralestapiaover 2 years ago
Just a small comment, blue&#x2F;green usually implies some sort of load balancing, here OP is just flipping a switch that changes a hostname and flips the roles of blue&#x2F;green from staging&#x2F;production.<p>Nothing bad with that, thought, and part of its genius is how simple it is.
评论 #32988630 未加载
评论 #32987870 未加载
评论 #32993416 未加载
homamiover 2 years ago
For what it is worth, I am handling about 130k views and registering ~1k paying users per day with a t2.large instance server running node, redis and nginx behind a free tier Cloudflare proxy, a db.t2.small running postgres 14, plus CloudFront and S3 for hosting static assets.<p>Everything is recorded in the database and a few pgcron jobs aggregate the data for analytics and reporting purposes every few minutes.
评论 #32988958 未加载
评论 #32990126 未加载
nurettinover 2 years ago
I love this simple setup. Big fan. I also do everything simple. Add more workers? Just enable another systemd service, no containers. Let the host take care of internal networking. The biggest cost is probably a managed db, but if you are netting $$ and want some convenience, why not?
评论 #32987929 未加载
jlundbergover 2 years ago
Using two servers, one for production and the other for staging&#x2F;failover, then switching upon release is a neat technique.<p>Been using it for our API backends for about ten years.
bemmuover 2 years ago
I&#x27;m doing about 1M database writes per day. DB is sqlite3, server is a Hetzner instance + extra storage that costs about $4 &#x2F; month total.<p>Computers are fast.
chinathrowover 2 years ago
Fascinating.<p>I have the exact same number of visits and run the site with a boring PHP&#x2F;MySQL setup from a cheap but very reliable 200€&#x2F;y shared hoster. Deployment via git over ssh as well.
评论 #32987646 未加载
tonnydouradoover 2 years ago
Not gonna lie, I was triggered by the no CI&#x2F;CD and shared database between staging and prod. But those concerns where very satisfactorily addressed. I&#x27;d miss some form of CI&#x2F;CD if it was a team, but I suppose that for a single person show, running tests locally is enough.<p>I do miss infra as code mentioned. If shit goes tits up with the infrastructure and everything was setup with clicking around in control panels, ad-hoc commands and maybe a couple of scripts, your recovery time will be orders of magnitude bigger than it has to be.
bakugoover 2 years ago
Maybe I&#x27;m missing something here, but what are the advantages of having two identical servers with a floating IP that switches between them instead of just running two instances of the app on the same server and switching between them by editing the nginx proxy config?
评论 #32988420 未加载
评论 #32987926 未加载
28304283409234over 2 years ago
Oh my all the opinions again. Software is not, believe it or not, a True or False game. TIMTOWTDI, folks. This guy rocks a solid process that he is comfortable with and that works. I for one applaud him for it.
jonplackettover 2 years ago
Something not mentioned but I’d like to know is the running cost?
评论 #32987590 未加载
评论 #32987599 未加载
评论 #32987606 未加载
评论 #32987594 未加载
woopwoop24over 2 years ago
if it was mine i would most certainly opt for ansible or something likewise, the overhead of logging into a machine and doing all the things by hand&#x2F;manual is more complicated and error prone than a playbook would be (at least for me and me forgetting all the steps all the time ^^).<p>But who are we to judge, impressive to earn 2,5k every month with it, kudos.
brundolfover 2 years ago
This is pretty close to my current (hypothetical) plan for how I&#x27;d stand up a small full-stack app as a solo dev. Only thing I didn&#x27;t think about was blue&#x2F;green deployment which sounds great. Glad to see a real-world case study showing that the overall strategy works well
petargyurovover 2 years ago
&gt; The trick is to separate the deployment of schema changes from application upgrades. So first apply a database refactoring to change the schema to support both the new and old version of the application<p>How do you deploy a schema that serves both old and new versions? Anyone got any resources on this?
评论 #32988358 未加载
评论 #32988504 未加载
hacknews20over 2 years ago
Love this: “absolutely No Kubernetes”.
abledonover 2 years ago
FAQ says an upgraded board (~10$) lasts forever... surely it wont be here in 2150 CE ? I&#x27;m always curious about the word &#x27;forever&#x27; in legal agreements, when truly do we expect a &#x27;forever&#x27; product to go out of service.
saradhiover 2 years ago
I came here to see more website links with one-man shows that are beating 150k&#x2F;m.
评论 #32988652 未加载
criley2over 2 years ago
It&#x27;s a lot more work than say Next.js and Vercel, but I suppose it costs a lot less to maintain in cash (trading cash for time).
评论 #32987732 未加载
评论 #32987569 未加载
wolfspawover 2 years ago
rdd discussion: <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Python&#x2F;comments&#x2F;xobba8&#x2F;how_i_deploy_my_bootstrapped_python_webapp_with" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Python&#x2F;comments&#x2F;xobba8&#x2F;how_i_deploy...</a>
simonebrunozziover 2 years ago
150k&#x2F;m - I thought it meant kilometers per hour. It&#x27;s obviously thousands per month.
koinedadover 2 years ago
Love the simplicity and clear description, thanks for sharing!
altdatasellerover 2 years ago
Do u have 15k paying users or are most of them free?
znpyover 2 years ago
It’s so simple, I love it.
thomasfromcdnjsover 2 years ago
Use use fly.io or heroku.
cutlerover 2 years ago
Hallelujah - a bit of sense regarding the appropriate use of Docker and Kubernetes.
keepquestioningover 2 years ago
What is the app?
评论 #32987941 未加载
pier25over 2 years ago
Why not simply run the app locally with the production database?<p>(either a copy of production or directly connecting to production instance)
评论 #32987598 未加载
deweyover 2 years ago
I&#x27;m a strong advocate of boring technology too but I&#x27;m also very much in favor of keeping things off my dev machine. In that case they have to run ssh, git and run a script to switch endpoints.<p>My current boring system for a simple Rails app (<a href="https:&#x2F;&#x2F;getbirdfeeder.com" rel="nofollow">https:&#x2F;&#x2F;getbirdfeeder.com</a>) is that I push to GitLab, the CI builds a docker image and does the ssh &amp; docker-compose up -d dance. That way I can deploy &#x2F; roll back from anywhere even without my computer as long as I can log into GitLab (and maybe even fix things with their web editor). Seems a lot &quot;more boring&quot; to me and having the deploy procedore codified in a .gitlab-ci.yml acts as documentation too.
评论 #32988541 未加载
Tanujatripathi0over 2 years ago
With December approaching, sort your hampers for the dear ones in Germany with a dash of creativity and a bit of utility. That’s what makes the best gift combos. If you’re not good at handling the finer balances, take online suggestions from gifts2germany.com and send across amazing gift baskets to pals and people in Germany, at least costs. We have gourmet hampers, cakes, baked goods, wines, champagnes and many more in our Christmas Hampers to Germany , with the promise of 100% sure deliveries of 1-2 days to Germany, with absolute free shipping. Enjoy the handpicked baskets, boutique Christmas Gifts to Germany with our 24*7 customer care and seamless delivery updates. Source: www.gifts2germany.com&#x2F;Christmas_Germany.asp
endigmaover 2 years ago
I don&#x27;t see why the author is so proud of avoiding tooling that would make their build and deploy process simpler? Even something like digitalocean&#x27;s own buildkit based &quot;apps&quot; would be an upgrade here. Deploying your app using ssh and git is not magic or simple it&#x27;s just a refusal to learn how actual software delivery is done.<p>Even totally dodging docker&#x2F;k8s&#x2F;nomad&#x2F;dagger or anything that&#x27;s even remotely complicated platforms like AWS&#x2F;DO&#x2F;Fly.io&#x2F;Render&#x2F;Railway&#x2F;etc obsolete this &quot;simple&quot; approach with nothing but a config file.<p>I also theorize that the author is likely wasting a boatload of money serving ~0 requests on the staging machine almost all the time, due to him literally switching a floating IP rather than using two distinctly specced machines for production and staging
评论 #32988676 未加载
评论 #32988082 未加载
评论 #32988168 未加载
评论 #32988145 未加载
评论 #32989127 未加载
评论 #32987993 未加载
评论 #33030951 未加载
评论 #32988102 未加载
评论 #32988137 未加载
评论 #32988078 未加载