Settings

Theme

Show HN: Sick of running random cron jobs, I built a small Keepalive for my FaaS

stayingalive.vessels.tech

12 points by lwilld 9 years ago · 8 comments

Reader

chatmasta 9 years ago

If you need to keep your function "warm," why are you using FaaS in the first place? This almost seems like serverless satire!

  • ezekg 9 years ago

    I don’t understand this either. What’s the point of going serverless with something like Lambda if you’re treating it like a regular old EC2 instance with more overhead? Is it cheaper or something?

    • stephenr 9 years ago

      I'm pretty sure the "point" is "I drank the koolaid. Turns out I have diabetes and can't have that much sugar but fuck it insulin injections work so pass the koolaid bro"

magnetic 9 years ago

I'm afraid I don't understand the purpose of this. Are there servers that die if you don't hit their URLs periodically? I use uptimerobot for my servers but it serves a different purpose.

  • bdcravens 9 years ago

    For FaaS (like Lambda), if a function hasn't been hit in a while, it'll be cold started when it is needed next. (Even though it's "serverless" behind the scenes they're likely containers that stay up for a little while to handle subsequent requests; a cold start means there's overhead of starting up the container)

    A hack to keep your function warm is to call it via cron or a service like this.

NetStrikeForce 9 years ago

404 and invalid cert :-/

busymichael 9 years ago

I get it. Well done!

I had the same problem when I first launched https://dndemail.com. Traffic was low and if no one uses the service for an hour or so, the first load in the app was slow.

I built a once a minute Cron to keep the app warm and initial requests quick.

Now I have enough traffic that I don't worry about the problem.

barna 9 years ago

Why once a minute?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection