Session State and Sitecore xDB

H
Harpreet Singh, PMP, ITILExperienced Manager, Enterprise Architect, Sitecore Certified
Confidential. All rights reserved. Valtech Solutions, Inc.
Session State
And
Sitecore xDB
v.1.0
00. Purpose
01. What is Session State?
02. Importance of Session
State in Sitecore xDB
03. Sitecore xDB session
state types
Agenda
04. Consequences of incorrect
session state configuration
05. Configuration Guidelines
and Best Practices
06. Q&A
Purpose
00
Consumers demand a single connected experience across multiple devices, whether they’re browsing from a desktop
computer, or searching from their mobile device.
Sitecore makes this consumer experience seamless
• Achieve accurate behavior
tracking using Sitecore xDB
and Session State.
• Enhance and optimize
customer experience based on
collected tracking information.
Let’s get started_
How can one…
What is Session
State?
01
11/7/2017 7
Session state
What is a Session State?
• HTTP is a stateless protocol. Client and server do not save user information during multiple requests. Due to this
nature of the protocol, neither the client nor the browser can retain information between different request across the
web pages.
• Some web applications may have to track the user's progress from page to page
• ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in
a Web application.
• Additional data can be added into session state as one makes requests
 For example: If I use my name to fill in a form, the application might store that as a session state value.
11/7/2017 8
Session state
How is a Session State stored?
‘in-proc’
• In process (InProc) is the default session state provider that comes with the Microsoft .NET
Framework.
• stores session state in memory on the Web server.
‘out-proc’
• Out of process (OutProc) session state means that you use an external ASP.NET session state
provider such as MongoDB or SQL Server.
• You can also use any custom provider that supports the Session_End event.
Importance of
Session State in
Sitecore xDB
02
11/7/2017 10
Sitecore xDB and Session State
• Every time a visitor (contact) makes a request, such as triggering a campaign or a goal this information is
held in session state until the end of session, before making its way to the collection database.
• Session state is a way of identifying visitors (contacts) on your website by assigning them a unique session
ID and by using cookies.
• xDB makes one trip at the start of a session to identify the contact and a second at the end to save all the
session data back to the collection database.
 This means fewer server trips are needed to write data back and forth to the collection database.
11/7/2017 11
Sitecore xDB and Session State
Example 1: With xDB; it is possible to track two simultaneous contact sessions from two different
devices, such as from a desktop web browser or a mobile phone.
Example 2: With xDB; in a multi-content delivery cluster environment, you can share contact information
between content delivery instances to ensure that contacts stay connected to the particular cluster
where their interaction originated.
Tracking the session state of your contacts is important regardless of whether you install a
standalone environment or a fully scalable environment.
Sitecore xDB
session state
types
03
11/7/2017 13
Sitecore xDB Session State Types
In Sitecore xDB, there are two types of session states:
• Private
• Shared
11/7/2017 14
PRIVATE Session State
• Private session state contains information about the interaction – such as pages visited
and goals triggered on that device
• In private session state (ASP.NET), all analytics session data related to a specific
interaction is collected and saved to the session state server.
Sitecore xDB Session State Types
11/7/2017 15
PRIVATE Session State
• The default provider is the in process (inProc) session provider which uses session state
stored in-memory. This is suitable for small, standalone installations used for test or
development purposes.
When you install Sitecore locally, private and shared session state are set to ‘in-proc’. Private
session state is configured where you would configure regular old ASP.NET session state –
in web.config.
Sitecore xDB Session State Types
11/7/2017 16
SHARED Session State
• Shared session state data includes all data that is unique to a contact and that can be
shared across simultaneous sessions, such as contact details, devices and engagement
automation states triggered.
• Contact data is collected and stored in a dedicated Shared session state store
• This information needs to remain accessible to other concurrent operations, for
example, interactions and background processes, and can be shared across multiple
sessions
Shared session state is configured in Sitecore.Analytics.Tracking.config.
Sitecore xDB Session State Types
11/7/2017 17
SHARED Session State
• This distinction (shared vs private) is required to support a single contact with two
concurrent sessions on two different devices.
Scenario:
You might start browsing a website on your laptop and continue on your phone whilst the
laptop session is still ongoing . What happens if you moved to a different engagement plan
state during the laptop session, or update the e-mail address that is stored in xDB? The
laptop session is still ongoing, so those changes have not made it to the collection database
yet.
This is where shared session state comes in. Contact data needs to be shared across
multiple device sessions, and is therefore stored in shared session state.
Sitecore xDB Session State Types
Consequences of
incorrect session
state
configuration
04
11/7/2017 19
Sitecore xDB and Session State
Laptop
Server
• I visit a website from my laptop and log
in.
• My login details happen to be my unique
identifier in the xDB, and it loads my
contact information from the collection
database.
• This website is backed by three content
delivery servers – my session sticks to
content delivery server #1 and will stay
there for the duration of my session.
• Session state data is managed In-Proc;
private and shared session state data is
written to memory.
So far, so good.
Scenario: In-Proc session state across multiple CD nodes
Session X
Attached to CD #1
Server
Server
11/7/2017 20
Sitecore xDB and Session State
Laptop
Server
Consequences: of not using Out-Proc session state across multiple CD nodes
Session X
Attached to CD #1
Server
Server
• I abandon my laptop and switch to my
workstation – I log in, am identified a
second time, and a new session “Y” starts.
• If my workstation session sticks to a
different content delivery server, Sitecore
has no way of knowing what is happening
to my contact data on content delivery
server #1 – because it has no way of
accessing the memory (and therefore the
shared session data) of another machine.
Workstation
Session Y
Attached to CD #2
11/7/2017 21
Sitecore xDB and Session State
Conclusion
• Configuring session state is particularly important if you have deployed a multiserver, fully scalable
environment with clusters of content delivery or processing servers.
• If you are using the xDB and you have more than one content delivery server per cluster, you MUST
USE OUT-PROC SESSION STATE.
• In-Proc is not an option.
• This is all because of the need to support the sharing of session state information for a contact with
two concurrent session on different devices.
11/7/2017 22
Sitecore xDB and Session State
Session Lifetime (Shared)
The following graph shows the lifetime of the sessions for a single contact
and two concurrent interactions made from two different devices.
In this case, shared session state is still useful for handling concurrent visits by the same contact from different devices
Configuration
Guidelines and
Best Practices
05
11/7/2017 24
Configuration Guidelines and Best Practices
• Depending on which database system you want to use when you configure your session state
database, you need to use a session state provider.
Sitecore comes with the following providers:
• Sitecore ASP.NET Session State Provider for MongoDB
• Sitecore ASP.NET Session State Provider for Microsoft SQL Server
• They also support the session end event that is required by the xDB to track website visits
reliably.
• On content delivery servers, private session state must support the Session_End event but this is
not required on content management servers.
• On content delivery servers shared session state must support the SessionEnd event. On content
management servers shared session state is not supported.
11/7/2017 25
Configuration Guidelines and Best Practices
• Achieve accurate behavior
tracking using Sitecore xDB
and Session State.
• Enhance and optimize
customer experience based on
collected tracking information.
Configuration Guidelines and Best Practices
Q & A
06
11/7/2017 28
References
• https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb
 Session state Section
• https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb/
session_state/session_state
valtech.com
where experiences are engineered
Session State
And
Sitecore xDB
987 Wellington St W., Suite 201
Ottawa, ON K1Y 2Y1 Harpreet Rana, PMP, ITIL
Senior Development Manager
Email: Harpreet.rana@valtech.com
Thank You!
Twitter: @DigitalTech4u
1 de 29

Recomendados

OpenProdoc Overview por
OpenProdoc OverviewOpenProdoc Overview
OpenProdoc Overviewjhierrot
1.1K vistas13 diapositivas
Enterprise Data Services for Strategic SOA por
Enterprise Data Services for Strategic SOAEnterprise Data Services for Strategic SOA
Enterprise Data Services for Strategic SOAsumedha.r
795 vistas31 diapositivas
Ca Se Presentation W A por
Ca Se Presentation W ACa Se Presentation W A
Ca Se Presentation W Athomasl824
143 vistas12 diapositivas
Open Source Data Services for Strategic SOA utilising WSO2 Data Services Server por
Open Source Data Services for Strategic SOA  utilising WSO2 Data Services ServerOpen Source Data Services for Strategic SOA  utilising WSO2 Data Services Server
Open Source Data Services for Strategic SOA utilising WSO2 Data Services Serversumedha.r
955 vistas60 diapositivas
Weblogic - overview of application server por
Weblogic - overview of application serverWeblogic - overview of application server
Weblogic - overview of application serverVibrant Technologies & Computers
151 vistas26 diapositivas
Web services por
Web servicesWeb services
Web servicesMohitKumar1985
196 vistas3 diapositivas

Más contenido relacionado

Similar a Session State and Sitecore xDB

Sitecore xDB - Architecture and Configuration por
Sitecore xDB - Architecture and ConfigurationSitecore xDB - Architecture and Configuration
Sitecore xDB - Architecture and ConfigurationCodersCenter
1.2K vistas22 diapositivas
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie... por
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...Microsoft Private Cloud
690 vistas12 diapositivas
session and cookies.ppt por
session and cookies.pptsession and cookies.ppt
session and cookies.pptJayaprasanna4
6 vistas53 diapositivas
Sitecore 7.5 xDB oh(No)SQL - Where is the data at? por
Sitecore 7.5 xDB oh(No)SQL - Where is the data at?Sitecore 7.5 xDB oh(No)SQL - Where is the data at?
Sitecore 7.5 xDB oh(No)SQL - Where is the data at?Pieter Brinkman
3.3K vistas31 diapositivas
Enterprise java unit-2_chapter-3 por
Enterprise  java unit-2_chapter-3Enterprise  java unit-2_chapter-3
Enterprise java unit-2_chapter-3sandeep54552
548 vistas21 diapositivas
Syn framework 4.0 and sql server por
Syn framework 4.0 and sql serverSyn framework 4.0 and sql server
Syn framework 4.0 and sql serverEduardo Castro
1.8K vistas37 diapositivas

Similar a Session State and Sitecore xDB(20)

Sitecore xDB - Architecture and Configuration por CodersCenter
Sitecore xDB - Architecture and ConfigurationSitecore xDB - Architecture and Configuration
Sitecore xDB - Architecture and Configuration
CodersCenter1.2K vistas
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie... por Microsoft Private Cloud
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...
Microsoft India - BranchCache in Windows 7 and Windows Server 2008 R2 Overvie...
Sitecore 7.5 xDB oh(No)SQL - Where is the data at? por Pieter Brinkman
Sitecore 7.5 xDB oh(No)SQL - Where is the data at?Sitecore 7.5 xDB oh(No)SQL - Where is the data at?
Sitecore 7.5 xDB oh(No)SQL - Where is the data at?
Pieter Brinkman3.3K vistas
Enterprise java unit-2_chapter-3 por sandeep54552
Enterprise  java unit-2_chapter-3Enterprise  java unit-2_chapter-3
Enterprise java unit-2_chapter-3
sandeep54552548 vistas
Syn framework 4.0 and sql server por Eduardo Castro
Syn framework 4.0 and sql serverSyn framework 4.0 and sql server
Syn framework 4.0 and sql server
Eduardo Castro1.8K vistas
Whitepaper: Software Defined Data Center – An Implementation view - Happiest ... por Happiest Minds Technologies
Whitepaper: Software Defined Data Center – An Implementation view - Happiest ...Whitepaper: Software Defined Data Center – An Implementation view - Happiest ...
Whitepaper: Software Defined Data Center – An Implementation view - Happiest ...
Session and Cookies.pdf por HamnaGhani1
Session and Cookies.pdfSession and Cookies.pdf
Session and Cookies.pdf
HamnaGhani12 vistas
SharePoint 2010 Global Deployment por Joel Oleson
SharePoint 2010 Global DeploymentSharePoint 2010 Global Deployment
SharePoint 2010 Global Deployment
Joel Oleson2K vistas
Micro Web Service - Slim and JWT por Tuyen Vuong
Micro Web Service - Slim and JWTMicro Web Service - Slim and JWT
Micro Web Service - Slim and JWT
Tuyen Vuong3.9K vistas
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013 por K.Mohamed Faizal
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
Deep Dive into SharePoint Topologies and Server Architecture for SharePoint 2013
K.Mohamed Faizal42.5K vistas
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36... por Patrick Guimonet
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...
2015-06-10 Ceus by IberianSPC - new options for SharePoint 2016 and Office 36...
Patrick Guimonet2.4K vistas
Web Basics por Hui Xie
Web BasicsWeb Basics
Web Basics
Hui Xie54 vistas

Último

Business Analyst Series 2023 - Week 3 Session 5 por
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
165 vistas20 diapositivas
Understanding GenAI/LLM and What is Google Offering - Felix Goh por
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix GohNUS-ISS
39 vistas33 diapositivas
Web Dev - 1 PPT.pdf por
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdfgdsczhcet
52 vistas45 diapositivas
AI: mind, matter, meaning, metaphors, being, becoming, life values por
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life valuesTwain Liu 刘秋艳
34 vistas16 diapositivas
The details of description: Techniques, tips, and tangents on alternative tex... por
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
110 vistas24 diapositivas
Future of Learning - Yap Aye Wee.pdf por
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdfNUS-ISS
38 vistas11 diapositivas

Último(20)

Business Analyst Series 2023 - Week 3 Session 5 por DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10165 vistas
Understanding GenAI/LLM and What is Google Offering - Felix Goh por NUS-ISS
Understanding GenAI/LLM and What is Google Offering - Felix GohUnderstanding GenAI/LLM and What is Google Offering - Felix Goh
Understanding GenAI/LLM and What is Google Offering - Felix Goh
NUS-ISS39 vistas
Web Dev - 1 PPT.pdf por gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet52 vistas
AI: mind, matter, meaning, metaphors, being, becoming, life values por Twain Liu 刘秋艳
AI: mind, matter, meaning, metaphors, being, becoming, life valuesAI: mind, matter, meaning, metaphors, being, becoming, life values
AI: mind, matter, meaning, metaphors, being, becoming, life values
The details of description: Techniques, tips, and tangents on alternative tex... por BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada110 vistas
Future of Learning - Yap Aye Wee.pdf por NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS38 vistas
PharoJS - Zürich Smalltalk Group Meetup November 2023 por Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi113 vistas
Future of Learning - Khoong Chan Meng por NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS31 vistas
The Importance of Cybersecurity for Digital Transformation por NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS25 vistas
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV por Splunk
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
Splunk86 vistas
Transcript: The Details of Description Techniques tips and tangents on altern... por BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada119 vistas
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... por Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin70 vistas
Five Things You SHOULD Know About Postman por Postman
Five Things You SHOULD Know About PostmanFive Things You SHOULD Know About Postman
Five Things You SHOULD Know About Postman
Postman25 vistas
Attacking IoT Devices from a Web Perspective - Linux Day por Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 vistas
Black and White Modern Science Presentation.pptx por maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 vistas
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... por NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS28 vistas
Data-centric AI and the convergence of data and model engineering: opportunit... por Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier29 vistas
How the World's Leading Independent Automotive Distributor is Reinventing Its... por NUS-ISS
How the World's Leading Independent Automotive Distributor is Reinventing Its...How the World's Leading Independent Automotive Distributor is Reinventing Its...
How the World's Leading Independent Automotive Distributor is Reinventing Its...
NUS-ISS15 vistas

Session State and Sitecore xDB

  • 1. Confidential. All rights reserved. Valtech Solutions, Inc. Session State And Sitecore xDB v.1.0
  • 2. 00. Purpose 01. What is Session State? 02. Importance of Session State in Sitecore xDB 03. Sitecore xDB session state types Agenda 04. Consequences of incorrect session state configuration 05. Configuration Guidelines and Best Practices 06. Q&A
  • 4. Consumers demand a single connected experience across multiple devices, whether they’re browsing from a desktop computer, or searching from their mobile device. Sitecore makes this consumer experience seamless
  • 5. • Achieve accurate behavior tracking using Sitecore xDB and Session State. • Enhance and optimize customer experience based on collected tracking information. Let’s get started_ How can one…
  • 7. 11/7/2017 7 Session state What is a Session State? • HTTP is a stateless protocol. Client and server do not save user information during multiple requests. Due to this nature of the protocol, neither the client nor the browser can retain information between different request across the web pages. • Some web applications may have to track the user's progress from page to page • ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. • Additional data can be added into session state as one makes requests  For example: If I use my name to fill in a form, the application might store that as a session state value.
  • 8. 11/7/2017 8 Session state How is a Session State stored? ‘in-proc’ • In process (InProc) is the default session state provider that comes with the Microsoft .NET Framework. • stores session state in memory on the Web server. ‘out-proc’ • Out of process (OutProc) session state means that you use an external ASP.NET session state provider such as MongoDB or SQL Server. • You can also use any custom provider that supports the Session_End event.
  • 9. Importance of Session State in Sitecore xDB 02
  • 10. 11/7/2017 10 Sitecore xDB and Session State • Every time a visitor (contact) makes a request, such as triggering a campaign or a goal this information is held in session state until the end of session, before making its way to the collection database. • Session state is a way of identifying visitors (contacts) on your website by assigning them a unique session ID and by using cookies. • xDB makes one trip at the start of a session to identify the contact and a second at the end to save all the session data back to the collection database.  This means fewer server trips are needed to write data back and forth to the collection database.
  • 11. 11/7/2017 11 Sitecore xDB and Session State Example 1: With xDB; it is possible to track two simultaneous contact sessions from two different devices, such as from a desktop web browser or a mobile phone. Example 2: With xDB; in a multi-content delivery cluster environment, you can share contact information between content delivery instances to ensure that contacts stay connected to the particular cluster where their interaction originated. Tracking the session state of your contacts is important regardless of whether you install a standalone environment or a fully scalable environment.
  • 13. 11/7/2017 13 Sitecore xDB Session State Types In Sitecore xDB, there are two types of session states: • Private • Shared
  • 14. 11/7/2017 14 PRIVATE Session State • Private session state contains information about the interaction – such as pages visited and goals triggered on that device • In private session state (ASP.NET), all analytics session data related to a specific interaction is collected and saved to the session state server. Sitecore xDB Session State Types
  • 15. 11/7/2017 15 PRIVATE Session State • The default provider is the in process (inProc) session provider which uses session state stored in-memory. This is suitable for small, standalone installations used for test or development purposes. When you install Sitecore locally, private and shared session state are set to ‘in-proc’. Private session state is configured where you would configure regular old ASP.NET session state – in web.config. Sitecore xDB Session State Types
  • 16. 11/7/2017 16 SHARED Session State • Shared session state data includes all data that is unique to a contact and that can be shared across simultaneous sessions, such as contact details, devices and engagement automation states triggered. • Contact data is collected and stored in a dedicated Shared session state store • This information needs to remain accessible to other concurrent operations, for example, interactions and background processes, and can be shared across multiple sessions Shared session state is configured in Sitecore.Analytics.Tracking.config. Sitecore xDB Session State Types
  • 17. 11/7/2017 17 SHARED Session State • This distinction (shared vs private) is required to support a single contact with two concurrent sessions on two different devices. Scenario: You might start browsing a website on your laptop and continue on your phone whilst the laptop session is still ongoing . What happens if you moved to a different engagement plan state during the laptop session, or update the e-mail address that is stored in xDB? The laptop session is still ongoing, so those changes have not made it to the collection database yet. This is where shared session state comes in. Contact data needs to be shared across multiple device sessions, and is therefore stored in shared session state. Sitecore xDB Session State Types
  • 19. 11/7/2017 19 Sitecore xDB and Session State Laptop Server • I visit a website from my laptop and log in. • My login details happen to be my unique identifier in the xDB, and it loads my contact information from the collection database. • This website is backed by three content delivery servers – my session sticks to content delivery server #1 and will stay there for the duration of my session. • Session state data is managed In-Proc; private and shared session state data is written to memory. So far, so good. Scenario: In-Proc session state across multiple CD nodes Session X Attached to CD #1 Server Server
  • 20. 11/7/2017 20 Sitecore xDB and Session State Laptop Server Consequences: of not using Out-Proc session state across multiple CD nodes Session X Attached to CD #1 Server Server • I abandon my laptop and switch to my workstation – I log in, am identified a second time, and a new session “Y” starts. • If my workstation session sticks to a different content delivery server, Sitecore has no way of knowing what is happening to my contact data on content delivery server #1 – because it has no way of accessing the memory (and therefore the shared session data) of another machine. Workstation Session Y Attached to CD #2
  • 21. 11/7/2017 21 Sitecore xDB and Session State Conclusion • Configuring session state is particularly important if you have deployed a multiserver, fully scalable environment with clusters of content delivery or processing servers. • If you are using the xDB and you have more than one content delivery server per cluster, you MUST USE OUT-PROC SESSION STATE. • In-Proc is not an option. • This is all because of the need to support the sharing of session state information for a contact with two concurrent session on different devices.
  • 22. 11/7/2017 22 Sitecore xDB and Session State Session Lifetime (Shared) The following graph shows the lifetime of the sessions for a single contact and two concurrent interactions made from two different devices. In this case, shared session state is still useful for handling concurrent visits by the same contact from different devices
  • 24. 11/7/2017 24 Configuration Guidelines and Best Practices • Depending on which database system you want to use when you configure your session state database, you need to use a session state provider. Sitecore comes with the following providers: • Sitecore ASP.NET Session State Provider for MongoDB • Sitecore ASP.NET Session State Provider for Microsoft SQL Server • They also support the session end event that is required by the xDB to track website visits reliably. • On content delivery servers, private session state must support the Session_End event but this is not required on content management servers. • On content delivery servers shared session state must support the SessionEnd event. On content management servers shared session state is not supported.
  • 26. • Achieve accurate behavior tracking using Sitecore xDB and Session State. • Enhance and optimize customer experience based on collected tracking information. Configuration Guidelines and Best Practices
  • 28. 11/7/2017 28 References • https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb  Session state Section • https://doc.sitecore.net/sitecore_experience_platform/81/setting_up_and_maintaining/xdb/ session_state/session_state
  • 29. valtech.com where experiences are engineered Session State And Sitecore xDB 987 Wellington St W., Suite 201 Ottawa, ON K1Y 2Y1 Harpreet Rana, PMP, ITIL Senior Development Manager Email: Harpreet.rana@valtech.com Thank You! Twitter: @DigitalTech4u

Notas del editor

  1. 11 - Overview Deck / Cover
  2. 12 - Overview Deck / Agenda