CGrates in distrubuted mode

82 views
Skip to first unread message

Eloy Coto Pereiro

unread,
Jan 17, 2016, 9:00:49 AM1/17/16
to CGRateS
Hey,

Long time without touching CGRates. It works pretty well, so I don't have
issues, so well done and thanks! ;-)

Ok, we are growing quite fast and I have a new scenario. Nowadays we have a
CGRates in Master-Slave config, so if one breaks we launch the another one.

But now we built another datacenter, and we need to work in parallel with 2
CGrates instances, so here our example:

- DC1:
   2 Kamailio instances
   1 Cgrates instance in HA

- DC2:
    2 Kamailio instalces
    1 CGrates instance

So, CGRates services are going to use the same Redis+Postgres. But not sure if
any way to share the Tarrifplans, CDRstats and credits. Any hint if this is
possible? Any advice?

Another doubt is, nowadays I'm using the API to load all the data. Could CGRates
work in parallel?

Regards

DanB

unread,
Jan 17, 2016, 12:25:23 PM1/17/16
to cgr...@googlegroups.com
Hi Eloy,

Answers inline ...


On 17.01.2016 15:00, Eloy Coto Pereiro wrote:
Hey,

Long time without touching CGRates. It works pretty well, so I don't have
issues, so well done and thanks! ;-)
Thanks also for feedback as always ;).


Ok, we are growing quite fast and I have a new scenario. Nowadays we have a
CGRates in Master-Slave config, so if one breaks we launch the another one.

But now we built another datacenter, and we need to work in parallel with 2
CGrates instances, so here our example:

- DC1:
   2 Kamailio instances
   1 Cgrates instance in HA

- DC2:
    2 Kamailio instalces
    1 CGrates instance

So, CGRates services are going to use the same Redis+Postgres. But not sure if
any way to share the Tarrifplans, CDRstats and credits. Any hint if this is
possible? Any advice?
All TP configs will be shared by just using same db on both sites (and keeping cache in sync).
The only issue is with accounts since they are not cached and they need locking. For that you will still need master/slave unless you do partitioning since we don't exchange locks and it will slow the system quite considerably if we would distribute such.

On the other hand for your particular scenario would be useful the HA branch which we will integrate most probably in the next couple of weeks into master (already in testing phase).


Another doubt is, nowadays I'm using the API to load all the data. Could CGRates
work in parallel?
Yes for rating and all other subsystems than accounting. Accounting needs to stay in one rater always (or use balancer when one machine does not longer handle your rating traffic).

Hope this helps.

DanB

Regards

--
You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To post to this group, send email to cgr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/53e0b0f7-ceba-40e9-b853-9badaf115510%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages