Unable to login to camunda with 2 pods(2 container)

Hi @Niall,
We are using spring boot camunda embedded engine, when we increase the pod 2(Conatiner 2). User is not able to login we are getting 401 status code.

But when decrease to 1 pod, then user can able to login. Could you please help me on this. Do we need any config changes to scale up?

What other changes exist in your setup, did you add a load balance or any other security.

Yes we have load balancer and deployed azure cloud

Does the REST api work normally? Is it just the webapps that are hard to access.
How exactly does the error occur

Hi,

Make sure to use configure sticky sessions in your load balancer, see Architecture Overview | docs.camunda.org.

Cheers,
Thorben

2 Likes

Thanks thorben

When using 2 rest-engines it is possible to loadbalance it as wanted.
But when using 2 camanda cockpits, it is not possible to work without sending all /camunda/ url to 1 only engine, and second as backup only.
Reason is simple - web client sends token, and it is unknown to second engine. It is why web client gets error.

Nginx conf:

upstream camunda_cluster {
     least_conn;
     server camunda-engine1:8080;
     server camunda-engine2:8080;
}
upstream camunda_web {
     server camunda-engine1:8080;
     server camunda-engine2:8080 backup;
}
server {
   listen 80;
   location /camunda {
      proxy_pass http://camunda_web;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_http_version 1.1;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   }

   location /engine-rest/ {
      proxy_pass http://camunda_cluster;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_http_version 1.1;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   }
}
1 Like

Thanks @MaximMonin , let me take look