This is mostly FYI, and maybe it is TMI, but it might help you in some small way gain additional insight into some of the interesting things we experience running three containers (two web application and one data container) at the same time (and how it also effects user avatars).
It’s is very interesting (and very cool, in my view), how the Redis / Sidekiq job scheduler works when they are running in parallel, but only one “active on the user web side”:
Hope you find this short discussion with real-world example interesting. It might provide a small amount of insight into the Discourse job scheduler, image optimization, and avatars based on our configuration:
I am a big fan of how Discourse uses Redis / Sidekiq to schedule background jobs; and consider this one of the key strengths and benefits of the Discourse S/W architecture.
Note: These concepts also apply, in various subtle ways, to different stages in the backup and restore process and other processes (time dependent), so it is a good idea to understand how and why sidekiq schedules jobs in the background.