top | item 45373018

(no title)

kketch | 5 months ago

You can also use Websockets with AWS Lambda through API Gateway.

And you can also use Websockets with Cloudflare workers: https://developers.cloudflare.com/workers/runtime-apis/webso...

However it's worth point that due to the concurrency model of AWS Lambda (1 client request / ws message = 1 lambda invocation / one process only ever handles one request at a time before it can handle the next one), you would end up spawning much more AWS Lambda instances than you would with Cloudflare workers or Wasmer Edge.

There are cost implications obviously, but AWS lambda works this way also to make concurrency and scaling "simpler" by providing an easier mental model. Though much more expensive in theory

discuss

order

No comments yet.