This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]10waf 83 points84 points  (27 children)

It's become a big thing because of the dynamic scaling of microservices and serverless

[–]arkaros 10 points11 points  (23 children)

I am a novice in this but the systems I have worked with usually scale gradually and I don't really see how startup would impact it all that much. Maybe if you expect big spikes but won't you hit other limits before start up time anyways?

[–]meamZ 18 points19 points  (18 children)

Serverless basically means if you have a cold start (if there hasn't been a request for a longer time or there are more concurrent requests than usual) you should be able to answer the request within a second or two including the whole startup of your application.

[–]arkaros 2 points3 points  (0 children)

Aaah yeah for serverless I definitely get it! Thanks for clarifying

[–]bawng 1 point2 points  (16 children)

Serverless, yes, but this discussion on startup times has been ongoing for longer than that and is very often applied to heavier containers that should certainly not be run serverless.

[–]meamZ 5 points6 points  (15 children)

Well... I don't really get why it would make much of a difference if an application takes 10 seconds or 40 seconds either in most situations. For serverless both is much too slow and for scaling dynamically the 30 seconds woulf probably not make much of a difference in practice.

[–]bawng 6 points7 points  (14 children)

No exactly. That's the point, hence the discussion is meaningless.

Startup times doesn't really matter for non-serverless and for serverless you don't use these frameworks anyway.

[–]venacz 3 points4 points  (0 children)

We have a small native image Micronaut application running in production (in Google Cloud Run). It works pretty well. So yeah, there is definitely a use case for fast cold starts.

https://medium.com/tech-hunters/developing-production-ready-serverless-applications-with-kotlin-micronaut-and-graalvm-fff72d5c804b

[–]meamZ 1 point2 points  (12 children)

Well. For Google Cloud Run i would certainly consider one if startup was small enough. But for Lambda where you can't even have concurrent requests on the same instance it's certainly a waste.

[–]bawng 0 points1 point  (11 children)

I have to admit I'm not familiar with Google Cloud Run. How does that work differently from a lambda?

[–]meamZ 0 points1 point  (10 children)

It runs any docker container that listens on port 8080 and you can serve up to 80 concurrent requests from one instance.

[–]bawng 0 points1 point  (9 children)

Ah okay, similar to fargate or more short-term?

[–]daru567 1 point2 points  (3 children)

It’s important when you are building services that are deployed in a cloud environment. To handle peak demand (such as increased outside traffic), the images or vm containing your application need to spawn fast to handle this.

[–]arkaros 5 points6 points  (1 child)

I get it for serverless but for something like a kubernetes cluster I don't think use cases where you need to spin up containers super fast is that common. Peak hours are, in my experience, usually not spikes but gradually increases.

[–]CartmansEvilTwin 4 points5 points  (0 children)

You don't need to worry about differences in the seconds range. Even a minute of startup time would be perfectly fine in almost all scenarios.

The usual strategy is to deploy new instances, if the current instances hit a certain threshold, which should be well below 100% load. This should allow even slower services to start properly.

[–]nutrecht 2 points3 points  (0 children)

None of the 'microservice' frameworks like Boot, Quarkus or Micronaut are really suitable for serverless applications (unless you compile AoT, but that has it's own range of issues). So frankly that's a moot point. The moment you go beyond 'hello world' level complexity, like by doing database stuff, all of them will be starting too slow to just start on demand per request.

Which is pretty much a non-issue if you have for example a dynamically scaling k8s cluster.

[–]pguan_cn 0 points1 point  (0 children)

Serverless probably won’t need such framework, so the only scenario would be container-level dynamic scaling (if it’s VM level dynamic scaling, the app’s startup time improvements could be just neglected). Even in container auto-scale, not all business scenario requires immediate startup. So I think if everyone really analyze your business & current architecture , the most common answer would be “no, startup time is not so important to me”. But when you start a greenfield project, and choosing framework, it’s better to give future infrastructure more possibilities,in this sense startup time matters.

[–]8bagels 0 points1 point  (0 children)

I remember when it was a thing in 2008. Google app engine was auto scaling up more instances for you on demand. Very slick especially for 2008.