In , Puma runs with 6 concurrency, 25 threads, which seems to work well for the traffic floods I get when posting. It's cached using Cloudflare, with Apache proxying in front of it.

Two Sidekiq containers, one for internal stuff (default, mailers, scheduler) @ 25 threads, and one for external stuff (push, ingress, pull), three replicas, at 25 threads each.

I use instead of Redis. PGBouncer in front of Postgres. Elasticsearch (have lots of memory). No S3 for now (have lots of disk space). Currently 3.5GB in DB, 150MB in Redis/KeyDB, and 90GB of Media.

I use crazymax/swarm-cronjob to run maintenance docker jobs:
* I run my own database vacuum & analyze jobs, which may be unnecessary, as I think Mastodon does some of that internally.
* My cleanup script in my Mastodon image runs daily: media remove after 2d, status remove after 30d, preview cards remove after 14d, remove-orphans (only runs 1/wk), and accounts cull (only runs 1/wk).

๐Ÿงต 2/3

#mastodon #keydb

Last updated 2 years ago

Next up in my series on how and what I : stuff. All of this runs in on a single node.

: Running Synapse (tried Dendrite first, but run into problems). I'm using samuelph/synapse-compress-state, but it's still heavier on disk usage than I'd like, given the number of rooms and time.

: I use a custom docker image, based on the official tootsuite docker image, except I bump MAX_ITEMS in feed history to 10,000 (my client no longer gets bumped to latest when I fall behind a bit), REBLOG_FALLOFF to 400 (fewer repeated boosts), upped some authenticated ratelimits (private server), and bumped max toot size, and added a cleanup script.

๐Ÿงต 1/3

๐Ÿท๏ธ

#selfhost #social #docker #swarm #matrix #mastodon #keydb #pgbouncer #activitypub #fakerelay #selfhosting

Last updated 2 years ago