Re-setup questions for NextCloud cluster

Comments

3 comments

  • Official comment
    Avatar
    Agus Syafaat

    Hi,

    I believe you follow the documentation here on how to setup the High Availability NextCloud with MySQL Galera Cluster. Please find my answer inline:

    1. If the first host goes down, will the other two hosts be down?

    Since the database uses Percona XtraDB Cluster, if one host goes down, the other hosts can still handle the traffic, and the application will remain up and running. Similarly, if one application server goes down, there are still two application servers running to maintain availability.

    1. Would it make sense to install Redis on all NC hosts and use localhost in the NC config instead?

    You can install the Redis Cluster along with the database and application on each server; however, keep in mind that running three different services on a single server will require more resources. The Redis Cluster should be configured in high availability mode. The Nextcloud configuration should include all Redis nodes in its settings.

    1. Or is it unnecessary, since NC is generally recommended to run in a single-writer setup?

    It depends on your requirements and traffic utilization, as well as whether you want to add a caching layer before reading from or writing to the database. The recommended database setup for Percona XtraDB Cluster is a single-writer configuration to avoid conflicts during write operations. That is why two ProxySQL instances are used — to separate read and write queries and distribute them across the database nodes.

    1. More broadly, will the cluster continue to function if the primary writer host is down, regardless of whether Redis is used?

    The cluster will continue to function regardless of whether Redis is used, as Percona XtraDB Cluster operates with active-active replication. If the writer host goes down, ProxySQL will automatically fail over to another host.

    1. I would appreciate any advice or experiences you can share, thanks in advance!

    Hope that helps!

    Thank you

    Comment actions Permalink
  • Avatar
    Solved

    Ok thanks a lot.

    0
    Comment actions Permalink
  • Avatar
    Jarrett VonRueden

    Great questions — these are exactly the kind of details that make or break a stable NextCloud cluster setup.

    For Redis, you’re correct that using the IP of a single host introduces a single point of failure. In production, it’s better to run Redis in a highly available configuration (either with Sentinel or a small HA cluster) instead of installing it separately on each NC host. Using localhost on multiple hosts won’t synchronize sessions properly unless Redis is clustered.

    As for the primary writer, the NC cluster will continue working in read mode if the writer node goes down, but write operations will fail until failover occurs. Configuring ClusterControl to promote a replica automatically can help with that.

    Regarding Delta Executor — if you plan to offload background jobs, it won’t directly change Redis placement, but you’ll want to ensure the job queue and Redis are both reachable by all app nodes to avoid task duplication.

    In short: one centralized, HA Redis setup + automatic failover for the DB writer = a much more resilient cluster.

    1
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk