3 ms·
How would this work in a serverless scenario where handler side runs in a Lambda for example? It seems a bit of a chicken and egg in this case. A service need
by moltar 3y ago
How would this work in a serverless scenario where handler side runs in a Lambda for example?
It seems a bit of a chicken and egg in this case.
A service needs to register itself with a control plane. But for the service to start it needs to get a request (via lambda invocation).
- lunarcave 3y agoFair question. > But for the service to start it needs to get a request (via lambda invocation). A service can also start by manually `.invoke`-ing the lambda. The control-plane will start the lambda function when there's work. Lambda "asks" for work to do. Once work has finished, lambda function exits. When deploying, we start the lambda function once so it can come out for air and advertise itself to the control-plane. This is an affordance we do only do for lambda, and currently in development with our deployment offering here [1] [1] https://github.com/differentialhq/differential/blob/236ffc5367fc0c8d8645fbdf41603592f7a2630d/control-plane/src/modules/deployment/lambda-provider.ts#L48 https://github.com/differentialhq/differential/blob/236ffc53...