Route tenants to different servers
Scenario: I have a domain mydomain.com. I have several Sisense tenants. (So, users access Sisense at mydomain.com/tenant1, mydomain.com/tenant2, and mydomain.com/tenant3.) Challenge: I want tenant1 and tenant2 to be hosted on a Sisense server in CountryA, and tenant3 to be hosted on a Sisense server in CountryB. I found three viable solutions. Solution 1: Different domain: Change my url to be countrya.mydomain.com and countryb.mydomain.com. Solution 2: Proxy: In Sisense config, set a proxy. "https://mydomain.com/countrya/" on the CountryA system tenant and "https://mydomain.com/countryb/" on the CountryB system tenant. In mydomain.com's routing configuration, set rules routing /countrya/* to CountryA's server and /countryb/* to CountryB's server. Solution 3: Cookie: Three steps: 3.1. In mydomain.com's routing configuration, route mydomain.com/tenant1 to server A, route mydomain.com/tenant2 to server A, and route mydomain.com/tenant3 to server B. 3.2. Make a file MyPlugin.js with the line document.cookie = "MyCookieName=CountryA; path=/; max-age=86400". Deploy per the Sisense plugin instructions. 3.3. In mydomain.com's routing configuration, set rules for "If MyCookieName=CountryA, route to the server A. If MyCookieName=CountryB, route to server B." Explanation of Solution 3: If you do just step 3.1 without 3.2 and 3.3, the user will be able to open mydomain.com/tenant1 and log in. But many Sisense features cause the user's browser to make requests to the system tenant mydomain.com. Those fail because your routing configuration doesn't know which server to send mydomain.com to. To solve that, when the user opens mydomain.com/tenant1, we give them the cookie stating which server to use, and then we check that cookie when they later make requests against the system tenant.43Views1like3CommentsMulti-Tenant and Proxy don't work together
My Sisense instance has multiple tenants. I can access the admin tenant at myurl.com/app. I can access MyTenant1 at myurl.com/MyTenant1/app. I then set the Proxy URL to "/MySisense" (in myurl.com/app/configuration/system). I can now access the admin tenant at my myurl.com/MySisense/app. But I can't access MyTenant1 anymore, neither at myurl.com/MyTenant1/app nor at myurl.com/MySisense/MyTenant1. Can I use both the Proxy URL feature and the multi-tenant feature on the same instance?Solved34Views0likes3Comments