On Mon, Dec 21, 2015 at 12:12 AM, Jeremy Evans <[email protected]> wrote:
> On Sunday, December 20, 2015 at 9:41:09 PM UTC-8, Mike Pastore wrote: >> >> Thanks Jeremy. One last question. :-) I'm scaling the :max_connections of >> my Sequel pool to match the number of threads in the Puma process. Is there >> a way to do the same for the read-only connections? It looks like it's only >> a maintaining a single connection to each slave. Or am I going about this >> the wrong way? >> > > If you have 4 max connections and 4 read only slaves using round robin, it > makes sense you'd end up with a single connection per slave. If you want > to average one connection to each slave per per Puma thread, you would need > to set max_connections to number of slaves * number of Puma threads. > Unfortunately, Sequel doesn't currently support separate max_connections > per shard, so that would also mean you would have you could have a maximum > of that many connections to the master server. However, Sequel does not > setup new connections until they are needed, so this may not be an issue in > practice. > Excellent! I can work with that. I still only see one connection on the slave but I probably need to monitor it under a load to make sure it's behaving as you've described. Thank you for your help and your patience with my many questions! -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
