You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/10 15:46:00 UTC

[jira] [Commented] (KYLIN-4423) use spring session to support clustered sessions

    [ https://issues.apache.org/jira/browse/KYLIN-4423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17056075#comment-17056075 ] 

ASF GitHub Bot commented on KYLIN-4423:
---------------------------------------

xiacongling commented on pull request #1157: KYLIN-4423 use spring session to support clustered sessions
URL: https://github.com/apache/kylin/pull/1157
 
 
   add spring session to manage user sessions, one can define a proper SessionRepository to enable it. for Redis repository, the following dependencies and spring bean can be added:
   ```
   <!-- dependencies with best compatible version, add it to pom.xml -->
   <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-data-redis</artifactId>
       <version>1.8.6.RELEASE</version>
   </dependency>
   <dependency>
       <groupId>redis.clients</groupId>
       <artifactId>jedis</artifactId>
       <version>2.9.3</version>
   </dependency>
   
   <!-- spring beans to add in applicationContext.xml -->
   <bean id="redisConnectionFactory"
         class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
       <property name="hostName" value="${kylin.session.redis.host:127.0.0.1}"/>
       <property name="port" value="${kylin.session.redis.port:6379}"/>
   </bean>
   <bean id="redisSessionRepository"
         class="org.springframework.session.data.redis.RedisOperationsSessionRepository">
       <constructor-arg index="0" ref="redisConnectionFactory"/>
   </bean>
   ```
   see also: https://issues.apache.org/jira/browse/KYLIN-4423
 
----------------------------------------------------------------
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


> use spring session to support clustered sessions
> ------------------------------------------------
>
>                 Key: KYLIN-4423
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4423
>             Project: Kylin
>          Issue Type: New Feature
>            Reporter: Congling Xia
>            Assignee: Congling Xia
>            Priority: Major
>
> When routing different APIs to different kylin instances, user may encounter permission problems since there are separate sessions.
> To share the sessions, one can config tomcat cluster to replicate all sessions to all instances. It's a HA solution for Tomcat, and is rarely used in recent years. Another idea is to store sessions in shared external storages like Redis. 
> We choose the latter solution. Spring Session is used to help manage user sessions and some work has been done to make it pluggable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)