Limiting Concurrent Tableau Sessions

The concept of selling for “concurrent users” comes up with relative frequency at Tableau. I’m not in any position to speak about licensing models, but if you are doing single sign-on to your Tableau Server, it’s very possible to implement a concurrency limiter.

The Tableau Server Repository has a view called _sessions, which only shows current active sessions. Prior to your SSO process, you can build a process that checks the _sessions view to see if there are already more active sessions than you want to allow.

My suggested query is the following:


SELECT s.site_id, t.url_namespace, COUNT(s.user_id)
FROM _sessions s
JOIN _sites t ON s.site_id = t.id
GROUP BY s.site_id, t.url_namespace

 

url_namespace from the _sites view gives you the identifier for a given Site. If you are using Sites, you need this to log in any way (This is called “site_content_url” in the REST API). All of the useful views in the Repository are listed in the excellent Data Dictionary.

Now, because concurrency in Tableau is really more about interactivity than time sitting, you’ll want to drastically shorten the session timeout from the default of 240 minutes. I’d suggest something like 5 so you aren’t locking people out when there is plenty of server capacity.

Also, the _sessions view contains the session_id field which can be used to programmatically end any session using the REST API’s sign out method. Per Russell Christopher: If you pass the session_id in the header like “X-Tableau-Auth: session_id“, it will end that session.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s