6 ms·
> If you're an indie hacker, a boostrapper, a startup, an agency or a consultancy, or just a small team building a product, chances are you are not going to nee
by CharlieDigital 4y ago
> If you're an indie hacker, a boostrapper, a startup, an agency or a consultancy, or just a small team building a product, chances are you are not going to need the cost and complexity that comes with modern cloud platforms.
Hard disagree.
- On cost: there is almost nothing better for the indie hacker, bootstrapper, or startup than cloud services.
I run apps on all three platforms (Google, AWS, and Azure) and my monthly spend is less than $2.00 < month using a mix of free tier services and consumption based services (Google Cloud Run, Google Firestore, AWS CloudFront, AWS S3, Azure Functions, Azure CosmosDB).
- On complexity: if you've used Google Cloud Run or Azure Container Apps, you know how easy it is to run workloads in the cloud. Exceedingly easy. I can go from code on my machine to running API in the cloud that can scale from 0 - 1000 instances in under 5 minutes just by slapping in a Dockerfile _with no special architecture or consideration, no knowledge of platform specific CLIs, no knowledge of Terraform/Pulumi/etc._
The current generation of container-based serverless runtimes (Google Cloud Run, Azure Container Apps) is pretty much AMAZING for indie hackers; use whatever framework you want, use middleware, use whatever language you want. As long as you can copy/paste an app runtime specific Dockerfile (e.g. Node.js, dotnet, Go, Python, etc.) in there, you can run it in the cloud, and run it virtually for free until you actually get traffic.
If any of the projects take off, then pay to scale. If they don't take off, you've spent pennies. Some months I can't even believe they charge my CC for $0.02.
- pclmulqdq 4y agoThe AWS free tier lets you do a lot, and if you use it well, it lets you avoid up to about $50/month of digitalocean bills. If you're never planning on scaling past a hobby project, the free tier is a great place to stay. If your hobby project "goes viral," though, it might cost you a few thousand dollars, but hopefully that helps you get a lot more money to turn your hobby into a business. If you have commercial intent, however, $50/month goes from an expensive hobby (3 streaming services) to a very cheap business. At that point, the fact that you don't have to pay for scale on DO VMs and other platforms actually makes a lot more sense. You can sleep at night knowing that you will still have a business even under a load spike, and $50 of digital Ocean buys you roughly the compute power of $1000+ of AWS managed services.
- CharlieDigital 4y agoThe beauty of container based serverless is that you have portability. If your hobby project takes off and you want to run it on DO up to a certain ramp, you can still move your container workload into DO. Google Cloud Run, Azure Container Apps, and AWS AppRunner (less so because it doesn't scale to zero) are really great tools for hobby devs and small shops.
- beardedetim 4y ago> The beauty of container based serverless is that you have portability. I think this is the major take away I am having from this hype cycle of the Cloud: that if we just build containers/functions, we can sort everything else out however the credit card allows. I'm on the fence about if it should be DO or EKS or GKE or whatever. That's for Credit Card Man and me to decide. As an engineer, I just want to build a docker container and call it a day.
- fullstackchris 4y ago> it lets you avoid up to about $50/month of digitalocean bills. Wish I'd know about this AWS free tier, because that sounds a lot like my monthly digital ocean bill :')
- nicoburns 4y agoWhat are you running that costs $50/month? Several services with decent amounts of traffic?
- CharlieDigital 4y agoIf you run an RDS instance, I can see hitting that. But there are alternatives like using Supabase or any of the Postgres or MySQL aligned serverless DBs like Cockroach, Planetscale, or other services if you want relational semantics and still be serverless. On AWS, the load balancer is also surprisingly pricey; easily eats up $20/mo.
- 4y ago
- helsinkiandrew 4y agoAgree, we bootstrapped a business from cents a month to $4 or $5 now, there's no maintenance, and I know if we get mentioned on Oprah - we'll be able to cope with a blip thousands of signups a second. I know how I'd run the system on our own hardware but can put off that decision to when (or if) we need it.
- jokethrowaway 4y agoif you're spending less than 2$ per month how much traffic -> how much money can you make? Sure, I also have plenty of static websites hosted for free by vercel / netlify / heroku / yourpick and even free functions. As soon as you start hitting traffic, functions start to cost a lot vs your own vps. My ideal setup right now is free static hosting from the marketing budget of friendly saas, free cloudflare on top and then APIs hosted on small vps (I have plenty of stuff on digitalocean but if I were to start from scratch I'd go fully with hetzner). I avoid the big 3 as much as I can and I laugh for hours when I see the bills of clients using them.
- CharlieDigital 4y agoGoogle Cloud Run pricing is: - 2 million requests/mo free - First 180,000 vCPU seconds free - First 360,000 GiB seconds free Then: - $0.000024 /vCPU seconds - $0.0000025 /GiB seconds - $0.40 per million requests This will get you pretty far for $2/mo. Within the free tier itself, assuming you can process each request in 250ms on a 1 vCPU container, you get 720,000 requests before you start paying for compute usage. Each $1.00 is another ~38,000 vCPU seconds (@1 GiB second) or ~152,000 requests @ 250ms per request. Roughly speaking, $2/mo. is 1 million requests @ 250ms each request consuming 1 GiB seconds on a 1 vCPU container. (There's some nominal cost for egress and storage of container images).
- friendly_deer 4y agoThe thing that holds me back from Google cloud run Is that it is difficult to replicate that exact environment locally for testing and dev. If you’re working with stateless apps then that’s fine, But what is the typical local workflow of developing against a database, task Queue, etc.?
- CharlieDigital 4y agoWhich database? If you're going all-in on Google Cloud and using Firestore, then use the emulators [0]. The emulators includes Pub/Sub. For Cloud Task Queues, use an unofficial emulator [1] If you're not going all-in on Google Cloud and say you want to use Postgres, then use a `docker-compose.yaml` file and pull in a Postgres container instance or run a local Postgres if you want. Then pick a free Postgres compatible cloud service for the actual runtime (e.g. Supabase free tier). Same goes for MySQL. For AWS, I'd use LocalStack [2] [0] https://github.com/CharlieDigital/dn6-firebase https://github.com/CharlieDigital/dn6-firebase [1] https://github.com/aertje/cloud-tasks-emulator https://github.com/aertje/cloud-tasks-emulator [2] https://localstack.cloud/ https://localstack.cloud/
- yrgulation 4y ago“ there is almost nothing better for the indie hacker, bootstrapper, or startup than cloud services.” heroku, a vps or a dedicated server are all in the cloud, not sure what you mean by this.
- dimgl 4y agoYeah I can’t agree with you at all. Without setting up your own NAT Gateway on EC2 on a t2.micro instance (or something cheap like that), it runs you about $30. This isn’t even accounting for database costs, usage costs, development costs, etc. So right away that “I can’t believe they even charge my CC for $0.02” is real suspect. Do you have a completely empty AWS account? We haven’t even spoken about dev experience yet.
- CharlieDigital 4y ago> Without setting up your own NAT Gateway on EC2 on a t2.micro instance... The problem is that you're using EC2 instead of AWS App Runner, Google Cloud Run, or Azure Container Apps. > We haven’t even spoken about dev experience yet. I'd strongly recommend that you give Google Cloud Run a try. You can go from empty codebase to running, on demand serverlesss runtime via GitHub with only a Dockerfile. I can build an app from scratch and have it running in Google Cloud in probably under 3 minutes with no special CLI knowledge or build. Here's a sample Dockerfile I'd need to get a dotnet app into Google Cloud Run: # The build environment FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine as build WORKDIR /app COPY . . RUN dotnet restore RUN dotnet publish -o /app/published-app --configuration Release # The runtime FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine as runtime WORKDIR /app COPY --from=build /app/published-app /app # The value production is used in Program.cs to set the URL for Google Cloud Run ENV ASPNETCORE_ENVIRONMENT=production ENV IS_GOOGLE_CLOUD=true ENTRYPOINT [ "dotnet", "/app/my-app.dll" ] Every other aspect of the code remains unchanged. GCR will pull the code from GitHub, build the container, and operationalize it. https://github.com/CharlieDigital/dn6-mongo-react-valtio https://github.com/CharlieDigital/dn6-mongo-react-valtio
- 0xEFF 4y agoWhere do you store your secrets? Persistent data? How do you handle authentication and authorization when using cloud run only?
- CharlieDigital 4y agoAuthentication and authorization: I hand it off to Firebase identity management. But you can also just issue your own JWTs. You can run full applications in GCR like KeyCloak or IdentityServer. But the Firebase identity solution is really good. Example here: https://github.com/CharlieDigital/dn6-firebase https://github.com/CharlieDigital/dn6-firebase Persistent data: Firestore (or Supabase, Planetscale, or CockroachDB if you want relational). On other platforms, I've used Azure CosmosDB which has a pay-as-you-go model which is practically free for hobby/POC use cases. Secrets: depends on how secret it is; actual keys go into secrets manager in GCP which integrates with Cloud Run. Otherwise, you can configure it as an environment variable.
- perryizgr8 4y agoYour monthly spend is less than two dollars across GCP, AWS and Azure? If that's true, then of course it makes sense at your scale to stick with them.