I recommend most startups use Heroku. It takes a _huge_ scale to make moving to ec2 make sense in most cases.
I recommend most startups use Heroku. It takes a _huge_ scale to make moving to ec2 make sense in most cases.
Everything runs on the instance; a nightly job backs up the database to s3.
Deploying new code takes 15-20 seconds; if I want logs I can ssh in and look at them. The old ways of doing things work better than ever in 2021, thanks to cheap vertical scaling.
I have a side project on AWS that I deploy with capistrano, runs on a rails deploy that I configured by hand, and requires approximately 5 minutes of "dev ops" maintenance a month from me. Most of that is upgrading packages.
Switch that over to docker and terraform and who knows what else, and I wouldn't even have time to think about the project, but for the parasitic costs of the deployment infrastructure.
I'm 100% certain that n00b devs would mock me for my old man ways, but the old ways can scale quite far before you need anything else.
That said over time as the hosted k8s solutions have gotten better Heroku has comparatively become less compelling, plus while Heroku can get to a large scale, you will eventually start to run into limitations with what you can run inside a dyno which would force you to move to something else. Since you'll have a 12-factor app though, it's relatively easy to migrate, the hard part is finding a new platform which doesn't feel like a massive downgrade vs Heroku.
Nah, and that's a bit of a hassle. Yesterdays data will do in a pinch (they'll have to manually rekey a days worth of data and some might get forgotten, but that's what stocktake is for).
That said, it's been running continuously for 3.5 years without downtime so far.
> What about if you get an influx of traffic and suddenly need to scale beyond what a single server can do (which is admittedly pretty high).
This particular app serves a small business, and I'm quietly confident they'll contact me before adding more than 100x their current staff overnight. It's currently running on a t3.micro, but I'd expect upgrading to a p4d.24xlarge with 1tb ram, 8gb NVME storage and 96 vCPUs will handle it if they do.
> How about logging
If I want to read the log files, I ssh in and read them. Sometimes I even scp them to localhost.
> deploys of a live copy of your site for each feature branch
I don't need that for a project with one developer and one stakeholder - I can just share my screen and walk him through what I'm changing.
If you didn't know all that, how long would it take vs `git push` to deploy your website?
Startups live and die by the ability to rapidly test ideas and go with the ones that stick. Heroku removes the absolute need to have devops knowledge.
Heroku is great, if you just want to start with something and show a proof of concept. As soon as you are doing more than just that you will probably get the first steep bills (at least from my point of view). We actually migrated from Heroku just a bit more than a year ago.
Most companies I know wouldn't really profit from k8s much if at all. A handful of VPS's setup half automatically using Ansible and a few clicks will be probably just enough. You will know, when you need to scale out to many servers when k8s is probably the better approach. You will probably have people doing just that full time at that point.
Our project has almost no traffic but the data processing part requires plenty of RAM. Literally with a few concurrent users it just won't work. And if autoscaling was enabled it'd be too pricey.
So I think it also depends on the use case. There are better PaaS alternatives.