unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Auto scaling workers with unicorn
@ 2017-12-04 23:42 Sam Saffron
  2017-12-05  1:51 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Saffron @ 2017-12-04 23:42 UTC (permalink / raw)
  To: unicorn-public

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-05  2:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 23:42 Auto scaling workers with unicorn Sam Saffron
2017-12-05  1:51 ` Eric Wong
2017-12-05  2:33   ` Ben Somers

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

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).