How we did for AWS, on Azure I think should be pretty the same:
- Create test1 page that will display server name(CD1, CD2,
etc.) and put information to session: trigger some goal and save some
information directly to session. For example something like:
//Register goal
var goalTrigger = Sitecore.Analytics.Tracker.MarketingDefinitions.Goals[{SomeGuid}];
var goalEventData =
Sitecore.Analytics.Tracker.Current.CurrentPage.RegisterGoal(goalTrigger);
goalEventData.Data = goalItem["Name"];
goalEventData.ItemId = goalItem.ID.ToGuid();
goalEventData.DataKey = goalItem.Paths.Path;
goalEventData.Text = "Goal for Logic";
Sitecore.Analytics.Tracker.Current.Interaction.AcceptModifications();
//Put value to session
HttpContext.Current.Session["test"] = "value in session";
- Create test2 page that will display server name(CD1, CD2, etc.), Session identifier, list of triggered goals, value that is shared in session. For example something like:
//Check that goal was triggered
var cache = Tracker.Current.Contact.KeyBehaviorCache;
bool goalTriggered = cache.Goals.Any(x => x.Id == SomeGuid);
//Check that value is present in session
var sessionValue = HttpContext.Current.Session["test"];
- Remove all CD servers except one(CD1) from load balancer(LB) and open test1 page in incognito mode(or after cleaning cookies in browser). (We suppose that goal(s) should be triggered and value should be in session)
- Remove CD server that was present in LB(CD1). Add another one server to LB(CD2). Open test2 page. Expected result: It should display expected Sitecore analytics information and information that you put directly to session.
- Close and re-open incognito window of your browser. Or clean cookies.
- Repeat 3-4 step with different combinations of servers. (CD2 <=> CD1, or other if you have more than 2 CD servers)
P.S. May be it is too general and obvious answer. I wanted to make it as comment. But there are too many characters to to fit in the comment.