As web developers and site managers, it's natural to want control over every aspect of your website's performance. However, when it comes to session management in CrowdHandler, we've found that many of our users worry unnecessarily about settings that don't significantly impact their site's performance. Let's break this down and explain why you can likely relax about these settings.
What is a Session?
In web applications, including CrowdHandler, a session is a way to maintain state and track a user's interaction with your site over time. It's like a temporary identity card for each visitor, allowing the system to recognize them as they move through different pages or return to the waiting room.
When your website is protected with CrowdHandler, the user maintains a session with your site, and they also maintain a session with CrowdHandler. If it makes you feel better you can find out the session timeout that your own application is using, and set ours to match. But they do not need to be perfectly aligned, because the sessions are kept alive as long as the user keeps interacting.
What is a Session Timeout?
A session timeout is the period of inactivity after which a session is considered expired. In CrowdHandler:
- Activity that keeps a session alive includes:
- Hits to URLs on your site that are protected by CrowdHandler
- Polls from the waiting room if the user is queued
- The timeout starts when there's no activity from either of these sources
- If the timeout period is reached without any activity, the session expires
What happens when a CrowdHandler Session Times Out?
Their session with CrowdHandler is no longer valid. If you have a queue, the user will be given a new session at the back of the queue if they try to connect to your site.
Do I Need to Worry About These Settings?
Here's the crucial point: For the vast majority of our users (around 90%), you don't need to worry about session settings at all. The only time you should be concerned with session management is if you're using the "One-In-One-Out" feature. And if you are using it, it's worth reconsidering whether you really need to.
Why One-In-One-Out Might Not Be Necessary
Many users assume that the "One-In-One-Out" setting is the best way to manage traffic. In reality, this setting is only beneficial in specific scenarios and can actually be counterproductive for most websites. Here's why:
- Session count is not a reliable indicator of server load.
- It's highly sensitive to session timeout settings, which can lead to inefficient traffic management.
A Better Approach: Rate-Based Traffic Management
Instead of focusing on active sessions, consider this question: How many checkouts (or other critical actions) can your server handle per minute? This number is a much more accurate reflection of your site's capacity. Once you've determined this, you can:
- Set your rate to this number in CrowdHandler.
- Forget about complex session settings.
This approach is simpler, more reliable, and less prone to unexpected behavior.
Do I need to put a time limit on the user's purchase once they get through the queue to make it move faster?
Not necessarily. If you are not using one in one out, it doesn't matter how long the user takes, you are not waiting for them to checkout before feeding in another user. If the user is twice as slow, they are probably putting half the load on your server. It's not session count that puts load on your servers, it's requests per minute, particularly the heavy requests like checkout.
Trust the Defaults
Our default settings have been carefully calibrated to work well for about 90% of our users. While it might be tempting to tweak these settings, in most cases, you're likely to achieve better results by leaving them as they are.
When to Consider Custom Settings
There are, of course, exceptions. You might want to adjust settings if:
- You're using the One-In-One-Out feature (which, remember, isn't necessary for most sites).
- You have very specific, unusual traffic patterns that don't align with typical e-commerce or content sites.
The Bottom Line
At CrowdHandler, we've designed our system to handle the complexities of session management so you don't have to. By focusing on a simple rate-based approach and trusting our default settings, you can ensure efficient traffic management without the anxiety.
Remember, if you're ever unsure, our support team is here to help guide you towards the best configuration for your specific needs. Don't let session anxiety hold you back from effectively managing your site's traffic!
Further reading
- Edit domain settings
- Crowdhandler active users vs site 'realtime' users
- Queue Regression. Common causes of users 'going backwards' in the queue.