zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] anmolnar commented on a change in pull request #1045: ZOOKEEPER-3400: Add documentation on local sessions
Date Wed, 18 Sep 2019 15:34:00 GMT
anmolnar commented on a change in pull request #1045: ZOOKEEPER-3400: Add documentation on
local sessions
URL: https://github.com/apache/zookeeper/pull/1045#discussion_r325746683
 
 

 ##########
 File path: zookeeper-docs/src/main/resources/markdown/zookeeperProgrammers.md
 ##########
 @@ -503,6 +503,88 @@ new list and failing to connect, the client moves back to the normal
mode of ope
 an arbitrary server from the connectString and attempts to connect to it. If that fails,
it will continue
 trying different random servers in round robin. (see above the algorithm used to initially
choose a server)
 
+**local session**.Added in 3.5.0, mainly implemented by [ZOOKEEPER-1147](https://issues.apache.org/jira/browse/ZOOKEEPER-1147).
+
+- Background:The creation and closing of sessions are costly in ZooKeeper because they need
quorum confirmations,
+  They become the bottleneck of a ZooKeeper ensemble when it needs to handle thousands of
client connections.
+So after 3.5.0, we introduce a new type of session: local session which doesn't have a full
functionality of a normal(global) session.
+,this feature will be available by turning on *localSessionsEnabled*.
+
+when *localSessionsUpgradingEnabled* is disable:
+
+- Local sessions cannot create ephemeral nodes
+
+- Once a local session is lost, users cannot re-establish it using the session-id/password.
The session and its watches are gone for good.
+  Note: Losing the tcp connection does not necessarily imply that the session is lost. If
the connection can be reestablished with the same zk server
+  before the session timeout then the client can continue (it simply cannot move to another
server).
+
+- When a local session connects, the session info is only maintained on the zookeeper server
that it is connected to. The leader is not aware of the creation of such a session and
+there is no state written to disk.
+
+- The pings, expiration and other session state maintenance are handled by the server which
current session is connected to.
+
+when *localSessionsUpgradingEnabled* is enable:
+
+- A local session can be upgraded to the global session automatically.
+
+- When a new session is created it is saved locally in a wrapped *LocalSessionTracker*. It
can subsequently be upgraded
+to a global session as required(e.g. create ephemeral nodes).If an upgrade is requested the
session is removed from local
 
 Review comment:
   Use space between sentences.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message