Seafile cluster: usage of seafile health check port 11001

Hi everybody,

I have some question about the usage of the health check port 11001 of seafile. For a better understanding I made a picture:


In addition here is the link to the releveant seafile manual entry:
https://download.seafile.com/published/seafile-manual/deploy_pro/deploy_in_a_cluster.md#user-content-HAProxy

In my understanding the “health check port” 11001 is used by the load balancers (e.g. haproxy) to get to know which seafile node is ready for incoming connections. As long as the load balancer reaches port 11001, requests to this frontend node are also routed.

Question 1: did I understand the meaning of the health check port correctly?

If so, I have a huge problem with the health check port. This seems to be tied to the Seafile service. It does not test whether seahub, database or a web server is running. What did I do: I just tried:

  • systemctl stop seahub
  • systemctl stop nginx
  • systemctl stop mariadb

In all three cases, seafile was not usable anymore but the front node was still accessible to haproxy. “Status UP”. Only when I stopped the seafile service, haproxy recognizes the node as “Down” and no longer forward requests.

Question 2: Did you experienced the same? Did you use the health check port provided by seafile? Do you use something else?

Question 3: Is it possible to increase the scope of the checks from the health check port?

Best regards
Christoph

Hi, Christoph. Probably you have found an answer to your question already. But anyway: We asked ourselves the same question recently, since some backend-servers did not behave the way they were supposed to, although the seafile-controller was still active on port 11001.

I figured setting up an http-check in haproxy.conf would be more reliable:

backend seafile_backend
  option http-check
  http-check send meth GET  uri /accounts/login/
  http-check expect status 200
  cookie sfnode insert indirect nocache
  server backend-server01 192.168.1.11:80 check cookie backend-server01
  server backend-server02 192.168.1.12:80 check cookie backend-server02
...

Info taken from: Using HAProxy as an API Gateway, Part 3 [Health Checks] - HAProxy Technologies

I would like to know if others consider this solution more reliable, too.

Best regards

Fred