Application scenarios and advantages and disadvantages of three kinds of session management methods in distributed environment

Source: Internet
Author: User

In a distributed environment, managing a session typically uses the following three ways:

First,session Replication mode management (that is, session replication)

Summary: Copy the session data broadcast from one machine to the rest of the machine in the cluster

usage Scenario : Fewer machines, less network traffic

Advantages : Simple implementation, less configuration, no impact on user access when a machine is down in the network

disadvantage : Broadcast replication to the rest of the machine when there is a certain degree, bring a certain network overhead

Second,Session Sticky mode management

Summary: the sticky session, when the user accesses a machine in the cluster, forcing all subsequent requests to fall on this machine

usage Scenario : Moderate number of machines, not very demanding stability requirements

Advantages : Easy to implement, easy to configure, no additional network overhead

disadvantage : The network has a machine down, the user session will be lost, easy to cause a single point of failure

Third, centralized cache management

Introduction: The session is stored in a distributed cache cluster on a machine, when the user access to different nodes, first take session information from the cache

usage Scenario : Multiple machines in a cluster, complex network environment

Advantages : Good reliability

Disadvantage : the implementation of complexity, stability depends on the stability of the cache, session information into the cache should have a reasonable policy to write

Application scenarios and advantages and disadvantages of three kinds of session management methods in distributed environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.