3 ms·
Kind of silly in a lambda though, as lambdas do not run concurrently. A bash script would suffice.
by ZitchDog 7y ago
Kind of silly in a lambda though, as lambdas do not run concurrently. A bash script would suffice.
- fahrradflucht 7y agoBut you can still have concurrency while handling a single invocation.
- ignoramous 7y agoLambda for NodeJs doesn't / won't run multiple requests in the same process but different V8 contexts at the same time? That sounds wasteful, and imo makes Cloudflare's Serverless tech superior for strictly network-io bound workloads. Lambda, to be fair, supports way many event triggers and all sorts of runtime and user-space constructs, but still manages warm start times <10ms which is really impressive.
- manigandham 7y agoCloudflare uses V8 Isolates feature and they build a lot of the API backends to follow the WebWorker spec. It's very efficient and well-suited for logic running in network calls at the CDN edge but limited to Node/JS code. [1] AWS Lambda uses their Firecracker micro-vm tech which supports more runtimes, environments and triggers than just Node and also runs container workloads. [2] 1. https://www.infoq.com/presentations/cloudflare-v8/ https://www.infoq.com/presentations/cloudflare-v8/ 2. https://firecracker-microvm.github.io/ https://firecracker-microvm.github.io/
- virmundi 7y agoI’m new at this, and would love feedback if I’m wrong, but I think that a lambda instance could be reused if the system had need. As a result the best practice is to closure global-like data in the handler function itself. This would then get passed down through the layers much like Golang’s context.
- Normal_gaussian 7y agoI have many that call a handful of backend services, handle errors, process the data, and send it to the client. Very async.
- deleted 7y ago[deleted]