Hacker News new | ask | show | jobs
by crandycodes 3144 days ago
I'm one of the devs on Azure Functions.

In general, the trick is to basically never be cold. When you get assigned an instance, you keep it for a while before we put it to sleep. On the first call, you get assigned a "pre-warmed" instance that helps optimize load time. You can still help out by making sure your dependencies are lightweight.

We've still got some work to do for the JVM before we GA Java, but it's a pattern we're pretty happy with so far.

1 comments

The pre-warmed instance is smart and a nice feature that AWS Lambda does not have. AWS Lambdas can be mostly kept warm via cron (incurring usage charges), but end-users will inevitably run into slow, cold-start responses during usage spikes as cold containers are spawned.