How to handle IService upgrade

Xiande Gu 21 Reputation points Microsoft Vendor
2021-04-19T06:57:21.737+00:00

Hi Team:
The problem can be simplified as below :
we have two services of our service fabric cluster:

public class ServiceA: IService
{
public async Task CallA()
{
var proxy = CreateProxy(urlofBService);
await proxy.CallB();
}
}

public class ServiceB: IService
{
public async Task CallB()
{
}
}
ServiceA will call ServiceB with remoting call.
If next time we update code to:

public class ServiceA: IService
{
public async Task CallA()
{
var proxy = CreateProxy(urlofBService);
await proxy.CallBNew();
}
}

public class ServiceB: IService
{
public async Task CallBNew()
{
}
}
we have 3 nodes in our cluster, when we do upgrade deployment, each node is placed in different upgrade domains, for example, node0 has upgraded, and node1 is upgrading, node2 is not triggered yet. At this moment, when a request hits ServiceA at node0, it will call CallBNew method, if this remoting call is routed to node2, there will be an exception, because node2 is still old code deployed. Any solution or suggestion about this problem ?

Thanks

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
252 questions
{count} votes

Accepted answer
  1. singhh-msft 2,431 Reputation points
    2021-04-20T17:17:12.01+00:00

    @Xiande Gu , thank you for reaching out to us. Happy to help. You are seeing this error because the current version of your Service fabric cluster and new version are not forward and backward compatible. In this case of incompatibility, the application administrator is responsible for staging a multiple-phase upgrade to maintain availability. In a multiple-phase upgrade, the first step is upgrading to an intermediate version of the application that is compatible with the previous version. The second step is to upgrade the final version that breaks compatibility with the pre-update version, but is compatible with the intermediate version.

    For more details around this, please check out Service Fabric application upgrade.

    --------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful