创业与商业anthonynsimon.com
一人技术初创公司的架构
The architecture behind a one-person tech startup
2021 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
作者 Anthony Simón 介绍自己一个人做 SaaS(Panelbear)时采用的架构:一个 Django 单体应用加上尽量多的托管云服务——静态前端、托管数据库与对象存储、自动扩缩容的部署方式,能不自己运维的部分就不自己运维。文章重点不在炫技,而在说明独立开发者如何在架构复杂度和时间成本之间做取舍。
为什么经久不衰:它给出了一个经过真实产品验证的「一人公司」架构样本,把「少运维、多托管、专注功能」的取舍讲得很实在,多年来一直是独立开发者反复引用的参考。
HN 评论精选
主张独立开发者直接用托管平台,接受厂商锁定换取时间。
我的一人 SaaS 配置:静态前端放在 Netlify(免费且无限扩展);后端跑在 Google App Engine 上,通过一些「魔法」连到 Gcloud 存储和托管数据库。我清楚这会带来厂商锁定和日后成本上升(如果我能做到那一步的话),但过去折腾过太多 Docker/k8s/Ingress,深知对非专家来说不值得花这些时间精力。
rory查看英文原文
My one-man-SaaS setup: - Static frontend hosted on Netlify (free unlimited scale) - Backend server on Google App Engine (connecting to Gcloud storage and managed DB via magic) I realize I'm opening myself up to vendor lock-in and increased costs down the road (if I even get that far), but I've wrangled enough Docker/k8s/Ingress setups in the past to know it's just not worth the time and effort for a non-master.
单体架构对单人团队是优势而非妥协。
作者似乎为自己用了 Django 单体而有点抱歉,但值得意识到:大公司里代码组织的部分目的是映射团队结构,这个约束反而可能妨碍最优的技术架构。一个人的团队用单体可以做得更好。
sa1查看英文原文
The author almost seems to apologize for having a django monolith. But it's worth realising that one purpose of code organisation in larger companies is to mirror the team organisation. That's a constraint on code that can interfere with the best technical architecture. You can do better with a monolith in a one-man team!
以另一位运营到 25 万用户的一人 SaaS 为例,补充自己的技术栈和真实成本。
我的一人 SaaS 架构,用户超过 25 万:Flask + Flask-Login + Flask-SQLAlchemy;uWSGI 应用服务器;Nginx;Dramatiq/Celery 配 RabbitMQ 跑后台任务;Postgres、S3 与 DigitalOcean Spaces 存数据;SSDB(磁盘版 Redis)做缓存、全局锁、限流、队列和计数器。我喜欢原文作者列出所用服务商并解释为何不自建。任何技术栈(Rails、Django、k8s)前期投入都很大,我希望能有更详细的配置说明来试试他的自动扩缩容方案。我每月基础设施约 4000 美元:S3 400、Mailgun 600、DigitalOcean 3000。
wakatime查看英文原文
My one-person SaaS architecture with over 250k users: * Flask + Flask-Login + Flask-SQLAlchemy [1] * uWSGI app servers [2] * Nginx web servers [3] * Dramatiq/Celery with RabbitMQ for background tasks * Combination of Postgres, S3, and DigitalOcean Spaces for storing customer data [4] * SSDB (disk-based Redis) for caching, global locks, rate limiting, queues and counters used in application logic, etc [5] I like how OP shows the service providers he uses, and why he decides not to self-host those parts of his infra. Also, there's a large up front cost involved for any stack (Rails, Django, k8s). I'd be interested in a more detailed writeup with configs, to try out OP's auto-scaling setup. My configs are linked in the gist below [2] for my non-auto-scaling Flask setup. I spend about $4,000/mo on infra costs. S3 is $400/mo, Mailgun $600/mo, and DigitalOcean is $3,000/mo. Our scale/server load might be different, but I'm still interested in what the costs would be with your setup. [1] https://wakatime.com/blog/33-flask-part-2-building-a-restful-api [2] https://gist.github.com/alanhamlett/ac34e683efec731990a75ab69d5699a1 [3] https://wakatime.com/blog/23-how-to-scale-ssl-with-haproxy-and-nginx [4] https://wakatime.com/blog/46-latency-of-digitalocean-spaces-vs-aws-s3 [5] https://wakatime.com/blog/45-using-a-diskbased-redis-clone-to-reduce-aws-s3-bill
历次讨论
同类还值得读
微软已死(2007)
Microsoft is Dead (2007)
Paul Graham 2007 年的一篇短文,判断微软在互联网与创业竞争中已不再令人畏惧、失去影响力——所谓“死”并非字面倒闭。
创业与商业上首页 8 次 · 2007–2025paulgraham.comH&R Block 与 Intuit 游说反对简化报税(2017)
H&R Block and Intuit Lobbying Against Simpler Tax Filing (2017)
2017年ProPublica调查报道梳理了H&R Block和Intuit如何通过游说反对更简单的美国报税方式,尤其是政府预填税表和免费申报等改革。
创业与商业上首页 5 次 · 2017–2022propublica.org你本不该有老板
You Weren't Meant to Have a Boss (2008)
Paul Graham 2008 年的经典文章,论证人类在演化中习惯于小团体协作,而大公司的层级结构和老板制度是人为产物,对程序员尤其有害——因为编程的本质是创造新事物,而大公司…
创业与商业上首页 5 次 · 2008–2020paulgraham.com为什么要在经济糟糕时创业
Why to Start a Startup in a Bad Economy
Paul Graham 的经典短文,论证经济衰退并不是创业的障碍:真正决定成败的是创始人和产品,而非宏观环境;衰退期反而竞争更少、人才更易招、成本更低。
创业与商业上首页 5 次 · 2008–2022paulgraham.com做那些不可规模化的事
Do Things that Don't Scale
Paul Graham 2013 年的经典创业文章《Do Things that Don't Scale》。
创业与商业上首页 4 次 · 2013–2025paulgraham.com编辑精选