Clustering Rstudio

azet's Avatar

azet

31 Jul, 2012 03:10 PM

Hi,

We managed to get Rstudio working as a webcluster setup with a few problems.

ATM. We have two Rstudio nodes connected to an Loadbalancer (Varnish-cache) which is balacing traffic based on the user-id string in the Cookie between the two test nodes.
This works pretty well, but logging in we end up having to enter our username and password 3-6 times until we get logged in. R folders will be shared between the nodes once we fix this issue.

Current Varnish config.:
` backend rstud01 {
.host = "1.1.1.1"; .port = "8787"; .probe = {

            .url = "/auth-sign-in";
            .interval = 5s;
            .timeout = 3s;
            .window = 5;
            .threshold = 3;

} }

backend rstud02 {
.host = "2.2.2.2"; .port = "8787"; .probe = {

            .url = "/auth-sign-in";
            .interval = 5s;
            .timeout = 3s;
            .window = 5;
            .threshold = 3;

} }

director rlb client {
{

  .backend = rstud01;
  .weight = 1;

} {

  .backend = rstud02;
  .weight = 1;

} }

sub vcl_recv {
/ Load balance by user cookie, if set / set client.identity = regsub(req.http.Cookie, ".*?user-id=([;]);.*$", "\1");

/ where to? / set req.backend = rlb; }

[...] `

Any suggestions?

  1. 2 Posted by azet on 31 Jul, 2012 03:14 PM

    azet's Avatar

    fomatting with backticks obviously didnt work, sorry.

    i attached the varnish configuration as text file.

  2. Support Staff 3 Posted by Josh Paulson on 03 Aug, 2012 01:40 AM

    Josh Paulson's Avatar

    Hello,

    Thanks for reporting this and for all the details. We have not specifically done a lot of testing in cluster environments and are not particularly sure what would be going wrong here. At this time we don't have much advice or direction to go, but if you are able to determine what is going wrong, we'd love it if you could post back for others to see.

    Josh

  3. Josh Paulson closed this discussion on 07 Aug, 2012 08:04 PM.

Comments are currently closed for this discussion. You can start a new one.