Is it safe to run multiple rails/sidekiq/streaming api instances?


#1

I’m running Mastodon on my kubernetes cluster, and wanted to increase redundancy a bit by running multiple instances of rails, sidekiq an the streaming server.

The system directory is shared via glusterfs already. I wasn’t sure if there is any reason running two instances of each service would cause any issue?


#2

Sidekiq, Puma (Rails web server) and Streaming can all run with multiple instances.
Larger Mastodon instances need to run multiple Puma and Sidekiq instances but Streaming not so much as it scales very well. That being said, redundancy is always a good idea.

Humblr, for example, runs 4 Sidekiq (plus 1 for mail only), 2 Puma and a single streaming instance.

My experience with glusterfs is limited but I don’t see any problems running multiple instances from it. Won’t hurt to try it.