Problem on Compile an app on a web farm

i have a web farm with HAProxy and 3 Windows IIS web servers, im using gitlab ci/cd pipeline where im stopping IIS on server2 and server3, and deploying new packages on server1, after deployment finished im copying WebApp/conf/ and WebApp/Terrasoft.Configuration/Pkg as mentioned in documentation to server 2 and 3, but after enabling HAProxy, i need to manually do compile all in server 2 and server 3. what im doing wrong or what im missing 

Like 0

Like

5 comments

Hi!

Based on your description, the deployment is almost correct, but in a web farm scenario you’re syncing only package sources and config (WebApp\conf and WebApp\Terrasoft.Configuration\Pkg) from node1 to node2/node3. After HAProxy starts sending traffic to all nodes, node2 and node3 still have stale compiled artifacts and/or cached metadata (Redis), so they detect a mismatch and require a manual “Compile all” locally.

Recommended rollout flow:

  • Put the farm into maintenance / drain traffic in HAProxy
  • Stop IIS on node2/node3
  • Deploy to node1 and run compile there (if required)
  • Copy the required folders plus compiled output from node1 to node2/node3
  • Flush Redis
  • Start node2/node3
  • Re-enable HAProxy traffic

Please let me know about testing this approach.

Kalymbet Anastasia,

Thanks for replay Anastasia,
let me quickly represent my pipeline stages

1)  Stop HA Proxy (stopping HA Proxy service, for now I have a downtime as you can see, in future I'm planning to change it) 

2) Stop cluster ( Stopping node2 and node3)

3) Install Clio (checking if there is installed Clio on node1, if no install it)

4) Create zip (Building the environment)

5) Deploy ( deploying and compiling  )

6) Copy From Server1 ( copying the artifacts from node1)

7) Copy To Secondary Servers ( sending the copied zip files to node 2 and node 3)

8) Clear Redis (clearing Redis cluster)

9) Start cluster (starting node2 and node3)

10) Start HA Proxy (starting HA Proxy service)

with this pipeline I'm getting the result where I need to manually compile node 2 and node 3 from 0/dev. So my question is, do I need copy something else from node 1 ( beside the directories that are in documentation) or do I need add compile step after coping to Node 2 and Node 3

Hello,

After installing the packages, could you please try transferring not only the files you usually move to the adjacent node, but all application binary files?

This will help us better localize the issue and determine whether the problem is caused by incomplete file transfer or if it is related to something else.

Anastasiia Zhmud,

Hello,
well I have tried adding
/Terrasoft.WebApp/Terrasoft.Configuration/Autogenerated and /Terrasoft.WebApp/bin to my pipeline, but didn't helped, if you mean different bin can you please tell the path?

problem is solved, thank you for your help

Show all comments