top | item 43800876

(no title)

rabysh | 10 months ago

This looks like a very good opportunity for explaining how fast computers are and how spinning up infra doesn't always make sense.

I'd try to show how much a single process could scale by writing a simple benchmark, and comparing the performance, cost and latency of the alternative.

The results should speak for themselves at that point.

(But also, spinning up a lambda to wait for a db request? Wat? Must be missing some more context/details)

discuss

order

ninetyninenine|10 months ago

I did this. But they said lambdas are so cheap it doesn't even matter.

I think there's a more pervasive problem of all engineers, especially younger ones not realizing that spinning up new serverless infra is harder then firing a coroutine.

>(But also, spinning up a lambda to wait for a db request? Wat? Must be missing some more context/details)

there's this crud server that serves as an admin view for a bunch of IOT devices. Sometimes we want to run a task that doesn't block this server. So they use lambdas for those external task runners.

Except those tasks are mostly database operations. It is a crud app after all. But I'm trying to tell them that you don't need to spin up a new CPU when the database is doing all the computation. Have the server wait for the database. Don't have the server wait for a lambda that waits for the Database. If you do that you're just spinning up a CPU and telling it to wait. It's more complicated.

At my company they think doing this is normal. It's pervasive how normal people feel this type of thing is. I'm just baffled. I'm wondering maybe it's just pervasive across the board. I don't think they realized that query calls on lambdas just make the lambdas wait on the database. The abstraction is so heavy they likely aren't even thinking about how they are provisioning an entirely new CPU to wait for a database.

vinibrito|10 months ago

I'm replying to this one, but I read all your other replies in this post, honestly I rarely laugh when reading here but I laughed more and more as I went through the discussion, and I think that maybe you were dealing with a troll, but I liked your explanations anyway, very informative, thanks for that.

Only a troll would defend that two CPUs are cheaper than one. Especially if you already have this one.

I'm a web developer, not even specialized in backend and I could follow and agree with what you said.

Hope you get better people to interact with next time :P