Skip to main content

Posts

Showing posts from June, 2020

Distributed session management in ASP.NET Core MVC Application

Introduction In this article, I am going to explain what are simple steps if you want to use distributed sessions in order to make your ASP.NET Core application load balanced. Assumption I am assuming that you already have created default project for ASP.NET core MVC app using visual studio. Sessions Session object is used in order to save or store user data for configurable amount of time. It uses dictionary on server side to store data and session id can be used as key to manage data back and forth. There are two types of sessions: 1. In Memory 2. Distributed In case of in memory session, session are stored in memory of a server and if you are using two servers, other server will not have access to it as it is saved in memory of server 1. It is discouraged for load balanced applications. While distributed sessions are stored in centralized place where both servers have access and it is considered to be more useful and reliable mechanism to store data in...