router, message processor routing question in multi DC

Hi all,

I need to clarify this. I have 2 DC, each DC I have 2 pairs of RMP (so total 4 RMP). Within each DC, a single router can route the API to both MPs within the same DC as well as across the other MPs in the other DC. Is that correct?

0 5 223
5 REPLIES 5

Leo, the standard message routing model is to let Routers in one region to route requests only to the Message Processors in the same region:

Client -> DNS lookup -> Hostname/IP address of one of the Routers in Region A -> Router in Region A -> Message Processor in Region A - Target Endpoint in Region A

The reason for this is to reduce the latency of cross region API calls and route a given request within a single deployment unit/region. Nevertheless, at the DNS server, we could configure DNS to do a fail-over between two regions if one region becomes unavailable or overloaded.

That is not correct. Per the published port diagram: https://docs.apigee.com/private-cloud/v4.19.01/port-requirements?hl=en there is no communication between routers in one DC and MPs in the other.

If one of your DCs loses both MPs for some reason, you should redirect traffic (eg, via DNS load balancing) to the remaining DC.

Thanks for the feedback. What if I setup so that all RMP in both physical datacenters are part of the single logical Apigee DC?

The main issue I see with this is around Cassandra. Cassandra makes decisions about where to store data based on which data center the Cassandra node thinks it's in.

This presents two issues:

1) reads/writes generally go to multiple nodes, which means that even for traffic that would otherwise go through a single DC, you're going to end up with cross-DC traffic for Cassandra (and depending on your proxy configurations, potentially a lot of it)

2) Cassandra will be unable to safely distribute data in such a way that you could safely lose 1 DC and have a working setup (although this would at least be avoidable if you set up each DC as a cassandra "rack").

In the end though, it's not really clear to me what advantage you gain by doing this. The router is a comparatively lightweight component so if you have one MP out of service the difference between having 1 and 2 working routers is unlikely to be significant - you may as well just take the whole node offline and let the other one take over completely.

Thanks @Christian King for the response. I am considering build the new apigee on prem using 1 logical DC which consists of 2 physical DCs. the reason is that we are running into an issue with MP cache. MP cache does not sync correctly from time to time between 2 logical DCs. Support confirms this is an known issue in 4.18x and have no ETA when this issue will be addressed. Our API uses cache heavily and the cache must be synced in all MP in all DC. The cache issue only impact MP across logical DC, within a DC, no issue. That is the only reason I am considering single DC