How to apply load balancer in camunda?

I am trying to apply load balancer concept in camunda server, I found this link but I need some implementation example like how to create shared database, I mean what are the place I need to change database configuration (e.g $TOMCAT_HOME/conf/server.xml). how to maintain the session?

any helps would be appreciated!

Hi,

you don’t need to share the session in the tomcat servers. Every command like startProcessInstanceByKey() or complete() will change the database before it replys to the caller. So you can start the process instance on tomcat1 and complete the first task on tomcat2.

Hope this helps, Ingo

1 Like

@Ingo_Richtsmeier thanks!

I have some doubt, I have completed load balancer setup, please refer this link for what I have done.

I have checked like this, please assume I have server A and B.

  1. enable A in load balancer and shutdown B, I logged in as demo user.
  2. enable B in load balancer and shutdown A, here demo user session got out whenever server switch over in load balancer.

can you explain me why it is happening like this?

Can you configure the load balancer to let clients stick to one of the nodes? Makes probably more sense anyway.

Cheers,
Thorben

1 Like

@thorben

yes! it is possible from haproxy load balancer. I just want to make sure about shared session is possible in camunda?

e.g) some frameworks(magento) are use Redis session as shared session between nodes.

Hey @busean,

Camunda does not have such a feature.

Cheers,
Thorben

1 Like

admin web need to login twice

Hi @leyoliu,

you have to configure the load balancer with sticky sessions: Architecture Overview | docs.camunda.org

Hope this helps, Ingo

1 Like