gpt4 book ai didi

session-replication - 如何在 Sakai 10 中设置 session 复制?

转载 作者:行者123 更新时间:2023-12-04 08:08:22 25 4
gpt4 key购买 nike

近期Open Apereo 14 conference在 Sakai 10 中有一个关于分布式缓存和 session 复制的 session :

http://lanyrd.com/2014/apereo/sdbbct/

我需要对 Sakai 10 采取哪些步骤来允许 session 复制?

最佳答案

session 复制是 Sakai 10 的一部分,但默认情况下是关闭的。要启用它,您需要:

  • Terracotta 已安装、配置和运行(当前需要 3.7.6 版 http://fossies.org/linux/misc/terracotta-3.7.6.tar.gz)
  • 负载均衡器后面的多个 Tomcat 服务器
  • 以下 sakai.properties 设置集(可在此处找到 https://source.sakaiproject.org/svn/config/trunk/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties):
    # CLUSTER CACHING (KNL-1184)
    # WARNING: this requires an external distributed caching server
    # Enable distributed caching
    # DEFAULT: false
    #memory.cluster.enabled=true

    # The URLs of the distributed cache servers
    #memory.cluster.server.urls.count=2
    #memory.cluster.server.urls.1={CACHE_SERVER_URL_1}:9510
    #memory.cluster.server.urls.2={CACHE_SERVER_URL_2}:9511

    ## The caches that will be using the distributed cache.
    ## SESSION failover: org.sakaiproject.tool.impl.RebuildBreakdownService.cache
    #memory.cluster.names.count=1
    #memory.cluster.names.1=org.sakaiproject.tool.impl.RebuildBreakdownService.cache

    ## Any Cache properties below that are not set will use the default values
    # Valid properties include: maxEntries(int>0), timeToIdle(int>0, seconds), timeToLive(int>0, seconds), eternal(true|false)
    # Defaults: maxEntries=10000, timeToIdle=600, timeToLive=600, eternal=false
    # Configure cluster caches using: memory.cluster.{cacheName}.{property)={value}

    # Session replication caching properties
    #memory.cluster.org.sakaiproject.tool.impl.RebuildBreakdownService.cache.maxEntries=50000
    #memory.cluster.org.sakaiproject.tool.impl.RebuildBreakdownService.cache.timeToIdle=3600
    #memory.cluster.org.sakaiproject.tool.impl.RebuildBreakdownService.cache.timeToLive=10800

    ## Session Replication settings
    ## WARNING: This requires a distribution mechanism of some kind (currently requires a distributed cache)
    ## NOTES:
    ## cache: org.sakaiproject.tool.impl.RebuildBreakdownService.cache must be set to a distributed cache (see memory.cluster)
    ## cache: org.sakaiproject.tool.impl.RebuildBreakdownService.stash should be configured to last as long
    ## as your user might need to navigate to JSF or other on-demand session tools after landing on a new server
    # Enable session cluster replication (see notes above)
    # Default: false
    #session.cluster.replication=true
    ## Performance tuning settings below - be careful with these numbers as adjusting them downward can create heavy load
    # Tuning setting, minimum seconds old the session must be before it will be replicated
    # Default: 20
    #session.cluster.minSecsOldToStore=20
    # Tuning setting, minimum seconds that must pass before session data is updated (since last store)
    # NOTE: certain events will cause the session data to be updated in the store regardless of this setting
    # Default: 10
    #session.cluster.minSecsBetweenStores=10
    # Tuning setting, minimum seconds after a session has been rebuilt from the store before it can be updated in the storage again
    # Default: 30
    #session.cluster.minSecsAfterRebuild=30

  • 请注意,Sakai 中的大多数工具都在 session 中存储页面状态的项目。 JSF、Wicket 和 Velocity 就是明确的例子。在大多数情况下,用户将被送回工具的主页,但他们将在当前站点和当前工具中保持登录状态。

    关于session-replication - 如何在 Sakai 10 中设置 session 复制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24145602/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com