Support for persistent session state across multiple web servers #217

Closed
opened 2025-12-29 16:19:35 +01:00 by adam · 3 comments
Owner

Originally created by @ghost on GitHub (Jul 14, 2016).

I've been able to load balance netbox behind an nginx load balancer config, using ip_hash sticky sessions, but as expected, changing to round robin or other LB methods causes the user to be logged out.

Support for something like redis, memcached, apache ignite, etc would be great, in order to fully support a highly available installation.

Originally created by @ghost on GitHub (Jul 14, 2016). I've been able to load balance netbox behind an nginx load balancer config, using ip_hash sticky sessions, but as expected, changing to round robin or other LB methods causes the user to be logged out. Support for something like redis, memcached, apache ignite, etc would be great, in order to fully support a highly available installation.
adam added the type: documentation label 2025-12-29 16:19:35 +01:00
adam closed this issue 2025-12-29 16:19:35 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 14, 2016):

Could you provide an example or link showing what this would look like? I don't have much experience with it myself.

@jeremystretch commented on GitHub (Jul 14, 2016): Could you provide an example or link showing what this would look like? I don't have much experience with it myself.
Author
Owner

@ghost commented on GitHub (Jul 14, 2016):

i'm a little more familiar with IIS (which uses ASPState database for DB-backed session state) and JBoss + Apache Ignite, and have only the experience i've gotten from using netbox when it comes to django.

it seems that for a first step, perhaps memcached/redis/etc might be overkill. maybe we could simply change how django keeps session info so that SESSION_ENGINE uses a DB backed persistent session.

i may try playing with this in my local environment and see if i can figure it out. if you're more familiar w/ django (i assume you are), this may be trivial for you as is.

@ghost commented on GitHub (Jul 14, 2016): i'm a little more familiar with IIS (which uses ASPState database for DB-backed session state) and JBoss + Apache Ignite, and have only the experience i've gotten from using netbox when it comes to django. it seems that for a first step, perhaps memcached/redis/etc might be overkill. maybe we could simply change how django keeps session info so that [SESSION_ENGINE](https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-SESSION_ENGINE) uses a [DB backed persistent session](https://docs.djangoproject.com/en/1.9/topics/http/sessions/#using-database-backed-sessions). i may try playing with this in my local environment and see if i can figure it out. if you're more familiar w/ django (i assume you are), this may be trivial for you as is.
Author
Owner

@ghost commented on GitHub (Jul 14, 2016):

django supports this natively provided the different web servers use a common SECRET_KEY. going to update documentation to reflect this for highly available installations.

@ghost commented on GitHub (Jul 14, 2016): django supports this natively provided the different web servers use a common SECRET_KEY. going to update documentation to reflect this for highly available installations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#217