Life cycle of a Cloud function can be roughly divided into five stages, which are these:
- You write code for a new function and define the conditions when the function should get executed. The function definition or code also contains the details of the event provider, such as Realtime database or FCM.
- You deploy the function using the Firebase CLI, and Firebase connects it to the event provider defined in the code.
- When the event provider generates the event that matches the conditions defined in the function, it gets executed.
- Google automatically scales the number of instances based on the workload.
- Whenever you update the code of a function or delete a function, Google will automatically update or clean up the ...