3

I just tested Elastic Beanstalk which seemed like the closest thing (just deploy docker) but then when I set it to scale from 0 to 5 instances, it correctly scales to 0 and then never scales back up from 0. ie. It properly shuts down pre-production and staging environments on weekends and nights but then would never turn on again unlike GCP cloud run.

The savings on GCP cloud run (because things shut down to 0) vs. AWS is insanely huge. Comparing my previous company (25 people), GCP costs were 50 bucks for the month and currently because nothing turns off, we are seeing 600 for approximately equivalent stuff.

As we scale and grow(more and more services), I see this only getting worse and worse with more and more services that can't scale back to 0 when not in use :(. Even at Twitter, staging and testing environments, we want scaled to 0 when not in use automatically to save TONS of money.

For startups, AWS seems like a very bad cost model these days unless using lambdas which is only functions. They have no lambdas equivalent for services like cloud run? or do they?

I hope I am wrong here and someone knows something as once we scale up with more services, our costs are going to just get worse with 3 environments, I do not want 3x the cost since many of these should spin down automatically and back up automatically.

EDIT: Devops just tried AWS EKS to set it to min instance count=0 but then just got timeouts as it never spun up instances. It seems it scales to 0 fine but can't scale out of 0 like cloud run :(. That is odd as many documents claim AWS EKS scales to 0 but IMHO, you can't say that if you can't scale back out of 0 to 1, 2, 3 under load. I am very confused then and wondering if configuration is wrong?

Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
  • 2
    Wouldn't AWS App Runner be the closest equivalent to GCR ? – Adi Dembak May 19 '22 at 10:50
  • I used the default Elastic Bean configuration but changed min to 0 @Parsifal. Looking at triggers in Elastic Bean seems it can only poll every so often so scaling up is too late. – Dean Hiller May 20 '22 at 08:18
  • @Parsifal I would be happy with ANY config that would do this so I do not need to give my config, right? We escalated to more experts in our devops company who said it is not possible (I am hoping they are wrong or App Runner works) – Dean Hiller May 20 '22 at 08:19
  • crap @AdiDembak - sooo close, you are right but in an article I read "There is one noteworthy difference between Cloud Run and App Runner. Cloud Runner enables you to scale down to zero instances if there are no demands for the application’s service; App Runner doesn’t support that use case". This is huge savings with staging/preproduction & 15 microservices. – Dean Hiller May 20 '22 at 08:55
  • Well, without seeing your config I have no idea whether you're doing load-based scaling (which of course can't come back from 0 instances) or time-based (which can, and I've done that many times). – Parsifal May 20 '22 at 12:49
  • As a follow-up: the people who will be able to answer your question probably haven't used a default EB configuration in years (it's been around 6 for me). And while you might have described _what_ you're trying to scale somewhere in that wall-of-rant, I wasn't able to figure it out. There's a big difference in how you scale EC2 instances versus EKS containers (and that in turn depends on whether you're deploying on Fargate or EC2). There are a lot of knobs to turn; if you want help, you should be willing to help the people who will help you. – Parsifal May 20 '22 at 13:26
  • Alternatively, you can take the time to read the docs and understand the different scaling mechanisms and how to use them. Or ask your devops people to do that (although they don't sound terribly competent). – Parsifal May 20 '22 at 13:27
  • No Worries @Parsifal , It turns out Adi Dembak nailed it in his first post as I tried out App Runner and posted that as the defacto match with one outstanding github issue requesting scale to 0. There is literally no configuration(decent defaults basically) and you just start and later can configure. Great for 1st time projects which I am constantly doing in startup land and need better launch times. – Dean Hiller May 22 '22 at 17:23

1 Answers1

2

App Runner is near one to one with cloud run but there is a github issue request scale to 0. It is basically the same service so thanks to Adi Dembark above!!!

kiranpradeep
  • 10,859
  • 4
  • 50
  • 82
Dean Hiller
  • 19,235
  • 25
  • 129
  • 212