My Oracle Support Banner

Is Affinity Group Required If A BGP/loadbalancer/VIP Is Used With Cassandra? (Doc ID 2779392.1)

Last updated on MAY 26, 2021

Applies to:

Oracle Communications Messaging Server - Version 8.1.0 and later
Information in this document applies to any platform.

Goal

Qn1: If a VIP is used for all the backend (access layer) systems in a single cluster to be listening on ports 25/143/993(and ISC) on the same IP address, then I would affinity groups be needed? 

An MMP making an IMAP connection, or an MTA making an LMTP connection, would hit one of the backends. If a backend is down, it would not receive connections.
Why would affinity groups be needed?
Is the affinity group needed on the backends so ENS can share events between imapd on all the nodes of the cluster?

I seems like the answer is both.

A BGP/VIP/GSLB could be used for the MMP/webmail/MTA systems to access the hostname of the store affinity group without defining the affinity group on those frontends.
But, the affinity group would still need to be defined on the backend (access layer) systems for enpd to share events between those backend (access layer) systems.
And in that case, why not just define affinity group the same on all systems?

It seems that a BGP/VIP/GSLB might be better able to steer connections to a primary datacenter. 
On the frontends, do they use the affinity group systems in a round-robin fashion? Or should lists in different order be configured on different systems so as to accomplish a more even spread?

Qn2: There appears to be a minor inconsistency (or omission) in the documentation. Looking at: https://docs.oracle.com/communications/F15020_01/doc.810/f15150.pdf#page=600&zoom=auto,-115,485

It says:
"affinitylist disables MX lookups completely and translates the logical host given into the corresponding affinity group.  Connections are then attempted sequentially to all the hosts in the group."

The hostselect option: https://docs.oracle.com/communications/F15020_01/doc.810/f15150.pdf#page=376&zoom=auto,-115,370

explains "failover" vs "roundrobin" and says it applies to MMP, mshttpd and LMTP.

I seems like the "affinitylist" doc in the former should mention the latter, or is the latter a doc bug? Does "hostselect" actually apply to LMTP?

It is preferred to want to "failover" for Cassandra and define the affinity group with the access tier hosts in different order on different systems.
Mostly, the concern is about frontend systems in different data centers. It is preferred for them to access the access tier servers closest to them -- probably in the same datacenter -- rather than access tier systems in remote locations. And for that reason, using a GSLB is preferred on the frontend systems rather than affinity groups.

For the LMTP client, failover (with affinity group order specifically chosen) would be good enough. The LMTP client processes are relatively short-lived. If one of them chooses a remote access tier systems, a new LMTP client will start soon enough and possibly make a different decision. But AService and mshttpd are long-lived processes. If they switch to a remove access tier system... a guess is that they would not switch back until some other failure event caused them to have to try another.

If a GSLB DNS name for the cluster is used -- the same name as the affinity group -- and that name is used on the frontends (instead of an affinity group), then the GSLB makes a geo-specific decision about which access tier system frontend systems will be directed to.  But... that still leaves the possibility that an MMP or webmail system could end up talking to a remove access tier system and stay with that. 

Does the code make this decision once and stick with it until a failure or does it make the decision for every connection?

If AService, mshttpd, and smtp_client (the LMTP client) make the decision with every connection, is the question answered by the definition of "failover" in the "hostselect" doc? i.e. "The failover value routes all connections to the first host in the list or the host that was most recently successful for this affinity group."

That sounds like it caches which one worked last time.

It seems that using affinity list on the frontends should not be done. They do the DNS lookup for every connection, correct?
If the affinity list name (only defined on the access tier systems) and the GSLB DNS name were, for example, castest1.example.com, would AService, mshttpd, and smtp_client do a DNS lookup of that name for every connection or would they do it once and cache the result?
 
Qn3: When a user connects to the MMP and the MMP proxies that connection to the backend (access tier), does the MMP remember which access tier system it proxied the user to and attempt to send future connections for that user to the same backend (access tier) system?  Or, are new connections (even from the same user) proxied to backend (access tier) systems independent of existing connections for the same user?
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.