[OpenSIPS-Users] Need some clarification in opensips cachedb_mongo db configutaion .

Liviu Chircu liviu at opensips.org
Wed Aug 24 10:00:01 UTC 2022


On 24.08.2022 11:56, Sasmita Panda wrote:
>
> Now my primary cluster goes down so my secondary cluster becomes 
> primary . I have updated the connection string against the domain in 
> route53 . Now
> *primary-cluster.xzy.com <http://primary-cluster.xzy.com>* is pointed 
> to the new primary custer connection string .
>
> While creating a connection from the console through the mongo shell 
> it's getting connected . But opensips is not able to switch the 
> connecting string somehow . still it's trying to connect to the 
> previous primary connection string .
>
> It seems like opensips has cached the connection string and is trying 
> to connect to the same even after I have updated the string from the 
> backend .

libmongo will try each node in your CSV of nodes, there is no going 
around this.  Now, while your usage of two completely different clusters 
in the same connection string seems to be *non-conventional* (I don't 
recall any documentation advising this, all Mongo docs talk about 
connecting to either a *replica set*, or to a *list of* *mongos* 
servers), I still think it could work.  Maybe just configure the 
"connectionTimeousMS" parameters (or others??) and see if you can get 
libmongoc to time out faster on your 1st cluster, when it goes down.

Best regards,

-- 
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com
OpenSIPS Summit 2022 Athens, Sep 27-30 |www.opensips.org/events
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220824/b487e169/attachment.html>


More information about the Users mailing list