|
|
|
|
|
by rabysh
423 days 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) |
|
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.