6 ms·
The Architecture Behind a One-Person Tech Startup (2021)
- mitchbob 2y ago(2021). Discussion of this when it was first submitted (320 comments): https://news.ycombinator.com/item?id=26737771 https://news.ycombinator.com/item?id=26737771
- deleted 2y ago[deleted]
- extr 2y agoWould be interested to know which parts have better solutions as of 2024. But still feels pretty relevant.
- _puk 2y agoIf you click the link the original SAAS (Panel Bear) is now "a part of" cronitor.io. Wonder if they kept it as is, and how many people manage it nowadays.
- amzans 2y agoHey I'm the author of the post. We ran Panelbear for about a year before merging it into Cronitor's codebase. Cronitor is also a Django monolith but on EC2 and was already humming along nicely for several years through frequent traffic spikes. We had no reliability issues with K8s, but came down to: as a small team we decided to have less moving parts. The new setup is not too different from what I describe here: https://anthonynsimon.com/blog/kamal-deploy/ https://anthonynsimon.com/blog/kamal-deploy/
- deleted 2y ago[deleted]
- esafak 2y agoThis is pretty sophisticated for one person.
- swagasaurus-rex 2y agoFairly simple and explainable for an organization
- EuAndreh 2y agos/sophisticated/complex/ FTFY
- welanes 2y agoThings are much easier for one-person startups these days—it's a gift. I remember building a todo app as my first SaaS project, and choosing something called Stormpath for authentication. It subsequently shut down, forcing me to do a last-minute migration from a hostel in Japan using Nitrous Cloud IDE (which also shut down). Just pain upon pain.[1] Now, you can just pick a full-stack cloud service and run with it. My latest SaaS[2] is built on Google Cloud, so Authentication, Cloud Functions, Docker containers, logging, etc straight out of the box. Not to mention, modern JavaScript and CSS are finally good. With so many fewer headaches, it’s a great time to build. [1] Admittedly, I was new to software dev and made some rather poor tech choices [2] https://simplescraper.io https://simplescraper.io
- robertlagrant 2y agoHow do you find the costs involved with a cloud service like that? I remember getting bitten once with a bill from Azure because a service went wild with logging once.
- joshstrange 2y agoAlso solo founder here, for myself you just have to watch costs like a hawk when you make any big changes. AWS and friends have calculators but there is only so much you can estimate and it’s hard to know the usage patterns till something is live. I’m lucky that my work is event-based, as is it used by in-person live events so my usage comes in waves (pre-sales a month or two out, steady traffic the week leading up to the event, and high traffic the day before or week/day of the event). This means that at worst I only have to ride out the current “wave” and then I have some amount of time before the next event (gives me an opportunity to fix run-away costs. One of my big runaway costs was when I tried to use something like Datadog/NewRelic/Baseline. You work yourself up to the cost of the service, make your peace with it (the best you can, since it’s also hard to estimate), then get hit with AWS fees (that none of the providers call out) for things like CloudWatch when they are pulling logs/metrics out. I’ve had the CloudWatch bills be 4-6x as expensive as the service itself and it’s a complete surprise (or was the first time). Thankfully AWS refunded it when it happened. I caught it after 2 days and had run up a few hundred dollars in that time, I could have handled it but thankfully they refunded it for me. The second runaway cost was Google Maps, once you fall off that free tier the costs accumulate quickly. In just a few days I had a couple hundred in fees from that. I scrambled a switch to ProtonMaps and took my costs down to a couple dollars a month.
- FlyingSnake 2y agoCame here expecting a tangled mess of disparate frameworks but was pleasantly surprised to see sane choices in using Django as a base. Sane choices and it shows why the product got acquired.
- dmwilcox 2y agoContext: I write mostly write Python for a living and run a Django app as a major responsibility I always wonder if python, auto scaling, and cloud change the kinds of businesses (and margins) required. Running 60+ pods of gunicorn for an app incurs lots of overhead, especially if one is using small VMs. I can't count the number of war stories I've heard from SRE friends who joined some company and realized they were taking over a Django stack for the core of a business that was blowing gaskets left and right. This sort of thing just leaves me wondering if margins have to be high to support a slower language, slower framework, and complicated deployment model to work around the Python GIL. Call me jaded but I just wonder if it's worth the time to market to do Python these days versus say Go and be able to deploy a static binary and use all your CPU cores simply. K8s is way less tempting for a "one-process-architecture " (minus database and maybe nginx) until the system is much larger (instead a couple of systemd units would sort you)
- lifeisstillgood 2y agoI’m not sure I understand - pythonnis “just” a process once you kick it off, want to run 8 processes on 8 CPUs, kick off 8 processes. Are you saying that to run this 8 processes you suddenly need 8 VMs running in the cloud - yeah. That does seem expensive. It’s very tempting to say one should not start in the cloud but host locally, but that seems an unpopular view. But maybe as we start to see more and more local workspaces catering to people working from home, we will see more and more “mini data centres” - it might even by Oxides sweet spot. Edit: “”” because it actually winds up being less DevOps work, on average, to support open-source systems running on bare VMs, than to try to keep up with Google’s deprecation treadmill “”” https://steve-yegge.medium.com/dear-google-cloud-your-deprecation-policy-is-killing-you-ee7525dc05dc https://steve-yegge.medium.com/dear-google-cloud-your-deprec... Mr Yegge makes my point much better ofc
- schrodinger 2y agoWe went through a migration from Ruby on Rails (as a json api) to Go and it just really does make a difference when you need 1/50th the servers to run (don’t remember exact multiple, but it really was that dramatic—the concurrency model enabled so many parallel requests per instance compared to Ruby). It’s kinda like using a map reduce cluster when a beefy server with a few Linus commands piped could have handled the “big data” needs. Both have their time and place, but it’s amazing how far a simple setup can go, so don’t overengineer prematurely.
- andrewstuart 2y agoI closed the page at "Kubernetes", despite the "you may not need this", because that was all I needed to hear to know this setup has little to do with the ordinary one person tech startup.
- dimitar 2y agoI would normally avoid recommending k8s, but perhaps the founder already was pretty comfortable with k8s from a previous job and knows what to avoid. There are no production dbs in k8s, no service meshes, monitoring is only side-cars that send data to an off-cluster backend, The automatic deployment with flux seems pretty nice!
- p_l 2y agoHaving learnt k8s once, I found out it greatly simplifies things for me when I want to run new projects, even if it's single server only (there I use k3s). Especially if there's a chance I need to run more than one client, or environment, on a given server, which is more important for "solo" enterprise than for a bigger company because I do not have money or time to care of multiple servers.
- KronisLV 2y agoI guess some people are just very used to it nowadays, hence it will work pretty well to them - same as how someone might have 10+ years of experience in Java and pick it for a project and use it successfully, whereas someone else could find the pace of development in it to be slower than the alternatives (despite how decent it is nowadays). Personally, I think that containers are a good choice for most webdev projects. If you are just starting out, then Docker Compose is probably very much sufficient for anything that touches upon a single node. Realistically, once you need to most past that, I feel like most folks would be served just fine by something like Docker Swarm + Portainer, you'd still need to run your own web server in front of your containers if you want something similar to an ingress, but in my eyes that's a plus, given how simple the config is (if you've ever installed Apache/Nginx/Caddy it's very much like that), or maybe go with Traefik if you must. There's scaling, resource reservations and limits, overlay networking between nodes, port mapping, storage, restart policies, configuration and pretty much most of the things you might reasonably need. Something like Hashicorp Nomad could also be mentioned here, but Docker Swarm seems like the simpler option to me. Past that, it's not like you can't run a bit cut down versions of Kubernetes, that will decrease its surface area somewhat - K0s, K3s and others all try to do this. I personally rather like K3s, it also integrates with Portainer/Rancher nicely if you need a dashboard, you can take advantage of Helm charts and all that other good stuff. I found the choice of K3s using Traefik by default (when I last used it) a bit suspect (configuring a custom non-ACME wildcard cert as the default for the ingress wasn't exactly well documented), but overall it was an okay experience and the resource usage wasn't anything crazy either. For my personal stuff nowadays, I still run a Docker Swarm cluster and I've no complaints there. It doesn't have autoscaling out of the box, but then again, my workloads are too boring to need that and I enjoy the predictability in billing I get.
- deleted 2y ago[deleted]
- dakiol 2y agoI wish they could have explained the deployment/release part via ci/cd more in depth.
- wiradikusuma 2y agoMy backend setup for my one-person startup ("case study" for my book, https://opinionatedlaunch.com https://opinionatedlaunch.com) is GitHub (for code repo and CI/CD), Firebase (auth, analytics, push notif) and CloudFlare (static pages, DNS stuff) and Fly.io. Less work but more done. My only complaint Fly.io doesn't have managed DB (https://fly.io/docs/postgres/getting-started/what-you-should-know/#fully-managed-postgres https://fly.io/docs/postgres/getting-started/what-you-should...) and task queue. At work we use GCP, but try to be as high as possible in the abstraction layer (e.g. use Cloud Run and Cloud SQL).
- vindex10 2y agoI was able to use managed Postgres ~a year ago on Fly.io. They seem to have offloaded its maintenance to Supabase, but it is still seamlessly interfaced with Fly.io. Moreover, they still allow 1 free db per account: > Supabase offers one free, resource-limited database per Fly.io user Are you concerned that it is not directly managed by Fly.io? * also Kafka: https://fly.io/docs/reference/kafka/ https://fly.io/docs/reference/kafka/
- qeternity 2y agoI see a lot of comments to the effect that this is a complicated setup, especially for one person. I really think most people need to re-evaluate their stacks without all of the marketing of cloud providers and gigascalers. This setup is very similar to the startup that I run. We have used k8s from day one, despite plenty of warnings when we did, but it has been rock solid for 3 years. We also decided to run Postgres and Redis on k8s using Patroni + Sentinel and the LVM storage class. This means we get highly performant local storage on each node and we push HA down to the application. Was there a learning curve? Yes, it took a solid week to figure out what we were doing. And we've had the odd issue here and there, but our uptime has exceeded what we would have had with a cookie cutter AWS setup, and our costs have been a fraction (including human capital costs).
- malux85 2y agoI am solo builder and runner of https://atomictesselator.com https://atomictesselator.com and I have used k8s from day one. I also agree with you, it's been rock solid, and the ability to horizontally scale so easily is great. I dont even know which physical machines in my rack the jobs/pods are running on, I just have a high level dashboard (lens) and I can see the CPU+GPU utilization hit 100% as everything self balances, it's great, this has been very helpful scaling my GPU workload which has increased a lot recently
- FlyingSnake 2y agoLooks like the setup didn’t survive a death hug from HN, the site’s not loading for me.
- azornathogron 2y agoIt's just a typo in the URL. It should be https://atomictessellator.com https://atomictessellator.com (two Ls)
- deleted 2y ago[deleted]
- 2y ago
- cj 2y agoSmall secret: The best tech stack when starting a startup is one you don't have to learn. There's a million things you learn when starting a company. Don't make yourself learn an entirely new tech stack on top of everything else. This advice means you'll be using whatever you've used in the past which might not be the sexiest or newest technology, but your users won't care. Your users want a working product. Choose the stack that will result in a working product the quickest. Refactor and migrate to a better stack later, if necessary. (It rarely is) For me, that meant deploying to Elastic Beanstalk (I know, boring, no one talks about it, but it works!) and using Mongo because I was already comfortable with it. It also meant not using React, at first. This was the right answer for me, but might be the wrong answer for you! Build your app on the technology you know.
- CuriouslyC 2y agoThat's true if you're optimizing for start-up success. The odds of a startup succeeding are pretty low and mostly tech is not the cause of failures though. When people learn a new stack for a startup they're optimizing for the startup failing, so they can still derive some value out of the failure. This just comes down to a napkin calculation of expected value of building a startup given P(success). If your startup is looking like a real business out of the gate, using the simple stack you know is the way to go, and if it's more of a hobby project that you'd like to monetize eventually, learn something new.
- NameError 2y agoThis lines up with how I make tech stack decisions for my own projects. But I think it's not always obvious going into something if it's going to end up being a money-making endeavor or just an educational project in the end, so I'll fall somewhere in between. What makes the most sense to be is to be really selective about what new technologies to use, and try to really learn ~one thing per project. E.g. my current project is a small search engine, and I've spent a lot of time exploring / figuring out how to use LLM Embedding models and vector indices for search relevance (vs. falling back on using ElasticSearch the same way we use it at work), but I'm using tools that are familiar to me for the UI/db/infrastructure.
- nunez 2y agoHonestly, this is a pretty solid stack. I wonder how they make time to manage it all _and_ iterate on projects _and_ have a life outside of that. This is the biggest problem I've long struggled with. I don't know of a good solution.
- deleted 2y ago[deleted]
- danesparza 2y agoA solid Kubernetes stack kind of manages itself. This will help you have a life. Boundaries will also help (you need to time box certain activities it sounds like). You can do this. Just keep trying.
- ACV001 2y agoStack and the technical part is rarely the important factor in success. The idea and marketing seem to be the important bit. The stack can be the cause of failure, but it can never be the reason for the success of a startup.
- deleted 2y ago[deleted]
- danesparza 2y agoBecause you'll be fighting a lot of forces that don't care if you fail (as a startup entrepreneur) confidence in your stack will help you sleep at night. And this is a good thing.
- enahs-sf 2y agoI think the nice benefit here is because of OPs infrastructure experience and process, he can now quickly run and test new ideas and projects for a reasonable marginal cost. Seems legit. Very clean setup.
- mattbillenstein 2y agoGuy lost me at k8s and terraform - just put your thing on a single VM and yolo.
- oooyay 2y agoI can understand why you'd say that, but I don't think the world's that black and white. Many people would say a detached, Typescript frontend is less simple than SSR. At this point in my career writing a bunch of ad-hoc, per-page Javascript would be more toilsome than writing components. Thus, the prevailing idea of "simple" would be less simple for me. In that same way, if you've spent a large chunk of your career in Kubernetes then managed Kubernetes is probably a lot more simple than maintaining an image production pipeline and a disjointed Terraform deploy. You'd have to make a choice between immutability and non-immutability with VMs as well, and design lifecycles for them if you choose immutability. That choice is made for you with Kubernetes and has well-established patterns. That's to say, simple is highly subjective. Like another comment said, simple is the technology you know best today (and that you can easily hire for).
- marcosdumay 2y ago> You'd have to make a choice between immutability and non-immutability with VMs as well I'd like to emphasize the yolo from the GP. I does really not imply image maintenance and immutability. (By the way, "non-immutability" is called "mutability".) And no, if you know kubernetes to your heart, it's still very often easier to start the grug way and build OPS up only after you have something to run on it. (But, of course, there are exceptions. There are always exceptions.)
- tracerbulletx 2y agok8s is easy once you know it imo. My recent project I made a Digital ocean cluster and some Github actions to deploy to it in like half an hour, and it would be easy to port to another cloud, or self hosted k8s cluster. It can auto scale nodes, do 0 downtime deployments, bg deployments, has automated certificate provisioning, it does everything I need.
- codeisawesome 2y agoI’d love to read a blog post from successful one person startups that are in the highly competitive spaces like DevOps tooling (uptime, analytics…) on how they go-to-market and differentiate.
- grandimam 2y agoInteresting! I was wondering why the author choose Python + Django on the server-side when they could have just used TS + React + NextJS across the stack? On reason is that the author is relying on Celery for background jobs, but is there any performance reasoning for having a completely different backend stack.