HA-readiness (overview & discussion) #428

Closed
opened 2023-04-02 08:38:21 +00:00 by pat-s · 2 comments
pat-s commented 2023-04-02 08:38:21 +00:00 (Migrated from gitea.com)

General issue discussing HA-deployment of Gitea using the helm chart.

There has been an initial effort by @luhahn two years ago which was never fully finished and seems stale now ().

Yet much of the discussion and issues can be picked up on and this issue aims to summarize and give an overview.

Another effort in documenting all individiual components is . The final result of this issue should make it into .

Another discussion is whether Gitea should use statefulsets or deployments for it's replicas ().

Note

The content below will be updated over time.

Cache

Applies to "session cache" and "general cache".

  • memcached: even when deployed in "high-availability", memcached does not provide a smooth experience when Gitea replicas are > 1. Reason unclear, but often the user is reset to the home page without an active action.
  • redis: Redis should be used for HA. Two redis variants exist: redis and redis-cluster. While the latter might be preferable for larger instances, it functions a bit different and can currently not be used together with Gitea. See https://github.com/go-gitea/gitea/issues/23869.

DB

FIXME

Queues

Redis should be used for queue in HA mode.

Indexers

There's a difference between the ISSUE indexer and CODE/REPO indexer.

Code indexer

The issue indexer via db, elasticsearch, meilisearch (as of Gitea 1.20) or db.

Only meilisearch and db (if a HA-ready DB is in use) can be used in this case.

Code/Repo indexer

The only supported HA-ready repo indexer as of now is elasticsearch. If you don't have an elasticsearch instance, we recommend to turn it off for now while we work on a better solution.

In values.yml:

gitea:
  config:
    indexer:
      REPO_INDEXER_ENABLED: false

Storage

  • On disk: using a RWX volume
  • Remote: using an external HA-ready service such as minio.
General issue discussing HA-deployment of Gitea using the helm chart. There has been an initial effort by @luhahn two years ago which was never fully finished and seems stale now (#205). Yet much of the discussion and issues can be picked up on and this issue aims to summarize and give an overview. Another effort in documenting all individiual components is #350. The final result of this issue should make it into #350. Another discussion is whether Gitea should use statefulsets or deployments for it's replicas (#426). > **Note** The content below will be updated over time. ## Cache Applies to "session cache" and "general cache". - `memcached`: even when deployed in "high-availability", `memcached` does not provide a smooth experience when Gitea replicas are > 1. Reason unclear, but often the user is reset to the home page without an active action. - `redis`: Redis should be used for HA. Two redis variants exist: `redis` and `redis-cluster`. While the latter might be preferable for larger instances, it functions a bit different and can currently not be used together with Gitea. See https://github.com/go-gitea/gitea/issues/23869. ## DB FIXME ## Queues Redis should be used for `queue` in HA mode. ## Indexers There's a difference between the ISSUE indexer and CODE/REPO indexer. ### Code indexer The issue indexer via `db`, `elasticsearch`, `meilisearch` (as of Gitea 1.20) or `db`. Only `meilisearch` and `db` (if a HA-ready DB is in use) can be used in this case. ### Code/Repo indexer The only supported HA-ready repo indexer as of now is `elasticsearch`. If you don't have an `elasticsearch` instance, we recommend to turn it off for now while we work on a better solution. In `values.yml`: ```yml gitea: config: indexer: REPO_INDEXER_ENABLED: false ``` ## Storage - On disk: using a `RWX` volume - Remote: using an external HA-ready service such as `minio`.
lunny commented 2023-04-02 09:05:53 +00:00 (Migrated from gitea.com)

redis is not supported for indexer.

And two missed parties are session and queue.

`redis` is not supported for `indexer`. And two missed parties are `session` and `queue`.
pat-s commented 2023-05-03 07:51:04 +00:00 (Migrated from gitea.com)

has a condensed overview markdown doc now which will hopefully make into main soonish. I suggest to look it up for further information. The content in OP here is only slighlty accurate.

#437 has a condensed overview markdown doc now which will hopefully make into `main` soonish. I suggest to look it up for further information. The content in OP here is only slighlty accurate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#428
No description provided.