9.10. 会话后端
对于基于 director 的部署,horizon 的默认会话后端是 django.contrib.sessions.backends.cache
,它与 memcached 结合使用。出于性能的原因,此方法首选使用本地内存缓存,具有高可用和负载平衡安装的安全,并且能够通过多个服务器共享缓存,同时仍然将其视为单一缓存。
您可以在 director 的 horizon.yaml
文件中查看这些设置:
horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
horizon::django_session_engine: 'django.contrib.sessions.backends.cache'