CSPRO web with HA (high availability)

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
cscapellan
Posts: 2
Joined: July 21st, 2022, 11:44 am

CSPRO web with HA (high availability)

Post by cscapellan »

Greetings,
We're trying to set high availability for two servers running csweb. The scenario is that these two connect to two separate database instances, and we would like if one fails, that they automatically switch to the other one, with the minimal possible downtime.

How would we go about this? Thank you so much in advance.
cscapellan
Posts: 2
Joined: July 21st, 2022, 11:44 am

Re: CSPRO web with HA (high availability)

Post by cscapellan »

Just to clarify: we have two cloud (Azure) instances, each running csweb +database, and we will like to have some sort of redundancy between each.
This can also be load balancing (active/active or active/passive), replication or similar; due to the high amount of data transfer/load that we are expecting.

Thank you so much for your time, and thanks to ms Sherril for the phone call.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: CSPRO web with HA (high availability)

Post by sherrell »

Hi Connie,

So based on our call, it sounds like you are being asked to draft a COOP (continuity of operations) plan. The team member (our boss) who is out of the office right now is the best person to answer this; hopefully he can respond within a few days or so. But to summarize a few things:
  • Based on your setup (tablet collection, single cloud server for accepting the data, 2 servers in the office for downloading of data from the cloud), you will have a 3-fold redundancy of data: on the tablets, on the cloud, and on the office servers
  • If the cloud server goes down (how likely is this, as most servers have multiple redundancies built into their system), then any data that can't be uploaded when the enumerator tries to sync with the server will just happen later when the server is back online.
  • If there were two cloud-based servers and each had its own domain. then if syncconnect() fails for the 1st server you could try the 2nd server (you would have to add this logic in to the CSPro program that handles the data uploads)
  • If the in-office servers are on the same power source, then they can't realistically act as redundancies for one another in case of a power loss. So, they would need to be on separate power sources and/or a generator.
  • Since the interview will last 15-20 minutes, to reduce load on the server, do not upload data after each interview, but rather, just do it every few hours/twice a day/something like that. Assign (via logic, i.e., do it automatically) different upload times to the enumerators so everyone isn't uploading data at the same time.
>The scenario is that these two connect to two separate database instances, and we would like if one fails,
>that they automatically switch to the other one, with the minimal possible downtime.


If you are downloading data from the server, the in-office server would be controlling the activity, not the cloud-based server. So, this scenario would never occur.

I'll let my boss confirm the above, but I believe that is the setup you're looking at.

Sherrell
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

Re: CSPRO web with HA (high availability)

Post by savy »

Hi Connie,

While we have not tested this out, for CSWeb to work in this mode, the requirement is that the two database servers are synchronously replicated. Here are a couple of links that would help your DB administrator with the configuration.
https://www.digitalocean.com/community/ ... untu-16-04
https://towardsdatascience.com/high-ava ... a16e134691

Thanks

Savy
Post Reply