Reputation: 159
Let's say there is an HTTP request currently being processed then we deploy the same function simultaneously.
What will happen to the current HTTP request? Will it be cancelled? or Firebase will wait before proceeding to deploy?
Upvotes: 1
Views: 186
Reputation: 83103
Instances provisioned with your function's previous version may continue running (and processing traffic) for several minutes after a deployment has finished. This ensures that traffic sent to your function while a deployment is in progress will not be dropped.
From the documentation
So, in other words, the current HTTP request will be executed. It's only when the deployment is completed and the platform needs to spin up a new Cloud Function instance that your new version will be used. Note that several instances of your Cloud Function can run in parallel if necessary: In one instance, events are treated one after the other, in serial.
Upvotes: 2