Hi, I followed github docs for arbitrary servers. Instead of defining 100s of nodes (postgresql server nodes for sharded) in sequel connect, I would like to connect to specific node when it is necessary and disconnect after. Pooling mechanism can be handled by pgbouncer on target node or pgpool2. So, caching is not so much an issue for me. Otherwise, I think defining each node in sequel setup and make them pooled (lets say 100 server with 5x pool) would make more memory and problem for throughput.
Anyway, Arbitrary server extension is something that I can use but somehow I am not able to setup it properly. I am using Rails and SequelRails plugin to work with Sequel on Rails. I setup shards properly. It just works. In model I can use Inbox.server(:shard_node_id).where(....).all shard_node_id is already declared in :servers. but I cannot make it work as arbitrary. I enabled; Sequel::Database.extension(:arbitrary_extension) # also did try other variants. , did Model, Dataset and Global *register_extension*. Nothing works. I cannot connect to specific server. All settings are same as shards. All I need is to change host. So, Inbox.server(host: '10.20.10.1').where(...).all does not work. I still get values from default database. But, If I specify shard name as a symbol as above, then it works. Rails app is multithreaded, default connection is pooled, Model has plugin enabled (sharding) How do I make it work? What Am I missing here? -- 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.
