Skip to content

Conversation

kmaehashi
Copy link
Member

By applying this patch, JubaQL gateway now persists session records to ZooKeeper, so that:

  • gateway instances can be clustered to provide high availability and performance
  • session records can be recovered after restarting Gateway, even in non-HA configuration

In other words, this patch resolves SPoF issue of JubaQL system.

External changes introduced in this patch

  • This patch adds the following options to Gateway.
    • --persist: enables session persisntence. When using this option, ZooKeeper hosts must be specified like -Djubaql.zookeeper=localhost:2181.
    • --gatewayId xxx: specify gateway cluster name. Runs in single node mode when omitted.
  • This patch adds dependency to Apache Curator library, which is a client library for ZooKeeper.
  • This patch changes the login protocol between Client and Gateway. When clients reconnect to the existing session, clients need to send login request (along with the session ID) to ensure that the session exists. (client side fix: Send session ID immediately when reconnecting to existing sessions jubaql-client#1)
  • Session persistence creates ZooKeeper node under /jubaql/session.

TODOs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants