gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

advanced.md (4774B)


      1 # Advanced
      2 
      3 Advanced settings options are provided for the sake of allowing admins to tune their instance to their liking.
      4 
      5 These are set to sensible defaults, so most server admins won't need to touch them or think about them.
      6 
      7 **Changing these settings if you don't know what you're doing may break your instance**.
      8 
      9 ## Settings
     10 
     11 ```yaml
     12 #############################
     13 ##### ADVANCED SETTINGS #####
     14 #############################
     15 
     16 # Advanced settings pertaining to http timeouts, security, cookies, and more.
     17 #
     18 # ONLY ADJUST THESE SETTINGS IF YOU KNOW WHAT YOU ARE DOING!
     19 #
     20 # Most users will not need to (and should not) touch these settings, since
     21 # they are set to sensible defaults, and may break if they are changed.
     22 #
     23 # Nevertheless, they are provided for the sake of allowing server admins to
     24 # tweak their instance for performance or security reasons.
     25 
     26 # String. Value of the SameSite attribute of cookies set by GoToSocial.
     27 # Defaults to 'lax' to ensure that the OIDC flow does not break, which is
     28 # fine in most cases. If you want to harden your instance against CSRF attacks
     29 # and don't mind if some login-related things might break, you can set this
     30 # to 'strict' instead.
     31 #
     32 # For an overview of what this does, see:
     33 # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
     34 #
     35 # Options: ["lax", "strict"]
     36 # Default: "lax"
     37 advanced-cookies-samesite: "lax"
     38 
     39 # Int. Amount of requests to permit per router grouping from a single IP address within
     40 # a span of 5 minutes. If this amount is exceeded, a 429 HTTP error code will be returned.
     41 #
     42 # If you find yourself adjusting this limit because it's regularly being exceeded,
     43 # you should first verify that your settings for `trusted-proxies` (above) are correct.
     44 # In many cases, when the rate limit is exceeded it is because your instance sees all
     45 # incoming requests as coming from the *same IP address* (you can verify this by looking
     46 # at the client IPs in your instance logs). If this is the case, try adding that IP
     47 # address to your `trusted-proxies` *BEFORE* you go adjusting this rate limit setting!
     48 #
     49 # If you set this to 0 or less, rate limiting will be disabled entirely.
     50 #
     51 # Examples: [1000, 500, 0]
     52 # Default: 300
     53 advanced-rate-limit-requests: 300
     54 
     55 # Int. Amount of open requests to permit per CPU, per router grouping, before applying http
     56 # request throttling. Any requests beyond the calculated limit are held in a backlog queue for 
     57 # up to 30 seconds before either being processed or timing out. Requests that don't fit in the backlog
     58 # queue will have status 503 returned to them, and the header 'Retry-After' will be set to 30 seconds.
     59 #
     60 # Open request limit is available CPUs * multiplier; backlog queue limit is limit * multiplier.
     61 #
     62 # Example values for multiplier 8:
     63 #
     64 # 1 cpu = 08 open, 064 backlog
     65 # 2 cpu = 16 open, 128 backlog
     66 # 4 cpu = 32 open, 256 backlog
     67 #
     68 # Example values for multiplier 4:
     69 #
     70 # 1 cpu = 04 open, 016 backlog
     71 # 2 cpu = 08 open, 032 backlog
     72 # 4 cpu = 16 open, 064 backlog
     73 #
     74 # A multiplier of 8 is a sensible default, but you may wish to increase this for instances 
     75 # running on very performant hardware, or decrease it for instances using v. slow CPUs.
     76 #
     77 # If you set this to 0 or less, http request throttling will be disabled entirely.
     78 #
     79 # Examples: [8, 4, 9, 0]
     80 # Default: 8
     81 advanced-throttling-multiplier: 8
     82 
     83 # Int. CPU multiplier for the amount of goroutines to spawn in order to send messages via ActivityPub.
     84 # Messages will be batched so that at most multiplier * CPU count messages will be sent out at once.
     85 # This can be tuned to limit concurrent POSTing to remote inboxes, preventing your instance CPU
     86 # usage from skyrocketing when an account with many followers posts a new status.
     87 #
     88 # Messages are split among available senders, and each sender processes its assigned messages in serial.
     89 # For example, say a user with 1000 followers is on an instance with 2 CPUs. With the default multiplier
     90 # of 2, this means 4 senders would be in process at once on this instance. When the user creates a new post,
     91 # each sender would end up iterating through about 250 Create messages + delivering them to remote instances.
     92 #
     93 # If you set this to 0 or less, only 1 sender will be used regardless of CPU count. This may be
     94 # useful in cases where you are working with very tight network or CPU constraints.
     95 #
     96 # Example values for multiplier 2 (default):
     97 #
     98 # 1 cpu = 2 concurrent senders
     99 # 2 cpu = 4 concurrent senders
    100 # 4 cpu = 8 concurrent senders
    101 #
    102 # Example values for multiplier 4:
    103 #
    104 # 1 cpu = 4 concurrent senders
    105 # 2 cpu = 8 concurrent senders
    106 # 4 cpu = 16 concurrent senders
    107 #
    108 # Example values for multiplier <1:
    109 #
    110 # 1 cpu = 1 concurrent sender
    111 # 2 cpu = 1 concurrent sender
    112 # 4 cpu = 1 concurrent sender
    113 advanced-sender-multiplier: 2
    114 ```