timothy65535 opened a new issue #918: URL: https://github.com/apache/incubator-kyuubi/issues/918
## Description From the ha discovery design of engine service in codebase, there're some area that can be improved. ### 1. EngineRef is exposed to the KyuubiSessionImpl When client connect to kyuubi server, the backendservice will open KyuubiSession. KyuubiSessionImpl use `EngineRef` and `ServiceDiscovery` at the same time in the codebase. The responsibility of `EngineRef` is to maintain the startup of the engine, it's better to move `EngineRef` to `EngineServiceDiscovery`.  ### 2. The mechanism for determining whether engine started successfully is flawed EngineRef use exists znode to determine whether engine started successfully or not(use the last znode), there are inconsistencies in this. So, take an idea to improve the detection mechanism by adding the started sessionid to the contents of the znone when engine started, then check the sessionid.  ### 3. Missing support multiple engines under `USER` share level Kyuubi supports `CONNECTION`, `USER`, `SERVER` share levels, we want to use kyuubi as hiveserver which can support multiple servers under same zookeeper namespace to share load pressure, client can pick hiveserver randomly. However, due to the influence of the second point above, kyuubi can not create other new engine under same user. Thes is also a little redundant to `subDomain`.  ### 4. Additional context The first and second points can be optimized step by step, the third point requires more thought, welcome to discuss. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
