question

KamalSivalingam-0057 avatar image
0 Votes"
KamalSivalingam-0057 asked KamalSivalingam-0057 answered

Azure Function with Event Hub Trigger - Blue Green Deployment

Hello,

We have been using blue green deployment for both our API and Web applications. We are also using the same model for Azure Functions that has Event Hub trigger. Recently noticed that we have both Standby and Production function app consuming events from Event Hub and thus causing epoch related error "new receiver 'nil' with higher epoch is created".

We are planning to stop the standby slot right after swap step to avoid this issue. Is there a better standard way to deploy Azure Functions with Event Hub trigger?

Thanks for your time and help.

Kamal

azure-functionsazure-event-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MughundhanRaveendran-MSFT avatar image
0 Votes"
MughundhanRaveendran-MSFT answered MughundhanRaveendran-MSFT commented

@KamalSivalingam-0057 ,

Thanks for reaching out here.

It appears that you are already using the deployment slots which is recommended approach when you have multiple environments. However the deployment method will not make any difference for this scenario.

The "new receiver 'nil' with higher epoch is created" errors are to be expected because of how the Event Hub Trigger works. This behavior is absolutely normal. I would request you to go through this stackoverflow article which has more details about this error

In latest stable versions of the Microsoft.Azure.WebJobs.Extensions.EventHubs SDK, this warning should just be informational.

https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventHubs

Feel free to reach out to me if you have any further queries.

I hope this helps!

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the stack overflow link. That helps. But my question was rather specific to how to turn off the standby. For a continuous delivery model, the standby might have an older code and will steal the lease and start processing events while the latest code is in production.

0 Votes 0 ·

@KamalSivalingam-0057 , It looks like disabling the functions in the standby slot seems the best approach to your problem

Disable the function in standby slot:
https://docs.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal#functions-in-a-slot

1 Vote 1 ·

@KamalSivalingam-0057 , Thanks for the clarification. I understand your concern. For now, you can stop the standby slot which you have implemented already. I will check if there is any other way and get back to you

0 Votes 0 ·
KamalSivalingam-0057 avatar image
0 Votes"
KamalSivalingam-0057 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.