how long does it take to deploy a serverless function?
This will vary based on your cloud provider and what services you are using.  AWS Lambda functions are designed to be highly available for the region.  Per the AWS Lambda FAQ: 


  When you update a Lambda function, there will be a brief window of time, typically less than a minute, when requests could be served by either the old or the new version of your function.


So the new function will not be instantaneously available, and there is a possibility that the old function may be called.