From: Sam Saffron <email@example.com>
To: unicorn-public <firstname.lastname@example.org>
Subject: Auto scaling workers with unicorn
Date: Tue, 5 Dec 2017 10:42:36 +1100 [thread overview]
Message-ID: <CAAtdryPUp3hSvrCCqOfs9B-DVsXnJdR=eKED8RzX5Duy5YXBCA@mail.gmail.com> (raw)
I would like to amend Discourse so we "automatically" absorb certain
traffic spikes. As it stands we can only configure unicorn with
num_workers and use TTIN and TTOUT to tune the number on the fly.
I was wondering if you would be open to patching unicorn to allow it
to perform auto-tuning based on raindrops info.
How it could work
1. configure unicorn with min_workers, max_workers, wince_delay, scale_up_delay
2. If queued requests is over 0 for N samples over scale_up_delay, add
a worker up until max_workers
3. If queued requests is 0 for N samples over wince_delay scale down
until you reach min workers
Having this system in place can heavily optimize memory in large
deployments and simplifies provisioning logic quite a lot.
Wondering what you think about this and if you think unicorn should
provide this option?
next reply other threads:[~2017-12-04 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 23:42 Sam Saffron [this message]
2017-12-05 1:51 ` Auto scaling workers with unicorn Eric Wong
2017-12-05 2:33 ` Ben Somers
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).