Skip to content

Git designed for AI agents.

3.3 KB
Raw Blame
# Example Praefect configuration file
# # TCP address to listen on
listen_addr = "127.0.0.1:2305"

# # Secured TCP address to listen on.
# tls_listen_addr = "127.0.0.1:2306"
# # Path to the certificate and its key used for TLS listening address.
# [tls]
# certificate_path = '/home/git/cert.cert'
# key_path = '/home/git/key.pem'
# Minimum offered TLS version. Options: ["TLS 1.2", "TLS 1.3"].
# min_version = "TLS 1.2"

# # Praefect can listen on a socket when placed on the same machine as all clients
# socket_path = "/home/git/gitlab/tmp/sockets/private/praefect.socket"
# # Optional: grace period before a praefect process is forcibly terminated (duration)
# # Defaults to "1m"
# graceful_stop_timeout = "30s"
# # Optional: export metrics via Prometheus
# prometheus_listen_addr = "127.0.01:10101"
# # You can optionally configure Praefect to output JSON-formatted log messages to stdout
# [logging]
#   format = "json"
# # Optional: Set log level to only log entries with that severity or above
# # One of, in order: debug, info, warn, error, fatal, panic
# # Defaults to "info"
#   level = "warn"
# [sentry]
#   sentry_environment = ""
#   sentry_dsn = ""
#
#  Optional: authenticate Gitaly requests using a shared secret. This token works the same way as a gitaly token
# [auth]
#   token = 'abc123secret'
#   # Read the token from a file (must have 0600 or 0400 permissions).
#   # The token and token_file options are mutually exclusive.
#   token_file = '/path/to/token/file'
#
# # One or more Gitaly servers need to be configured to be managed. The names
# of each server are used to link multiple nodes, or `gitaly_server`s together
# as shard. listen_addr should be unique for all nodes.
# Requires the protocol to be defined, e.g. tcp://host.tld:1234

[replication]
batch_size = 10 # configures the number of replication jobs to dequeue and lock in a batch
# Number of workers processing replication events per virtual storage (one target storage per worker).
# parallel_storage_processing_workers = 1

[reconciliation]
# Duration value specifying an interval at which to run the automatic repository reconciler.
# Automatic reconciliation is disabled if set to 0. Example: "1m" for reconciliation every minute.
scheduling_interval = 0
# Scheduling duration histogram buckets.
histogram_buckets = [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10]

[failover]
enabled = true
# Optional: Max duration of a single ping of Gitaly nodes in Praefect setup.
# Increasing it gives nodes under momentary pressure or transient network
# latency more time to respond, at the cost of slower failover detection for
# genuinely down nodes. Defaults to 1s.
# health_check_timeout = "2s"

[[virtual_storage]]
name = 'praefect'

[[virtual_storage.node]]
  storage = "praefect-git-0"
  address = "tcp://praefect-git-0.internal"
  token = 'token1'

[[virtual_storage.node]]
  storage = "praefect-git-1"
  address = "tcp://praefect-git-1.internal"
  token = 'token2'

[[virtual_storage.node]]
  storage = "praefect-git-2"
  address = "tcp://praefect-git-2.internal"
  token = 'token3'

[yamux]
# MaximumStreamWindowSizeBytes sets the maximum window size in bytes used for yamux streams.
# Higher value can increase throughput at the cost of more memory usage.
maximum_stream_window_size_bytes = 262144
# AcceptBacklog sets the maximum number of stream openings in-flight
# before further openings block.
accept_backlog = 256