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. Thanks, Jeremy -- 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.
