mastodon / chart

Helm chart for Mastodon deployment in Kubernetes
GNU Affero General Public License v3.0
152 stars 90 forks source link

Scaling #85

Open WyriHaximus opened 10 months ago

WyriHaximus commented 10 months ago

How is everyone scaling this chart? Looking for ways to scale when the webserver gets busier, but also when there is a ton of items in the queue and my instance would need more workers to process the data in the queue.

abbottmg commented 1 month ago

Right now I have a manually written autoscaler that watches CPU on the web container. For sidekiq I made an entry in values for each queue, so each queue gets its own ReplicaSet, with default pod count set in values. I then keep a loose eye out for traffic jams and manually scale. That mostly only matters if I catch a burst of dead jobs and retry them all.

I am interested in learning whether kubernetes supports custom metrics for autoscaling and if so how I could publish some sidekiq metrics to use there.

WyriHaximus commented 1 month ago

Right now I have a manually written autoscaler that watches CPU on the web container. For sidekiq I made an entry in values for each queue, so each queue gets its own ReplicaSet, with default pod count set in values. I then keep a loose eye out for traffic jams and manually scale. That mostly only matters if I catch a burst of dead jobs and retry them all.

Same, but watching CPU on sidekiq instead since I'm the only user.

I am interested in learning whether kubernetes supports custom metrics for autoscaling and if so how I could publish some sidekiq metrics to use there.

Kubernetes supports custom metrics, but you might want to have a look at keda.sh as it takes that to a whole new level.