Query on the parameter parameter allowed.message.processors={uuid_of_message_processor} set on router

asurajpai
Participant V

Hi, We came across the parameter allowed.message.processors={uuid_of_message_processor} to be set on the /<inst-root>/apigee4/conf/apigee/router/system.properties. We need more details on the above property? Does setting up the property will always make a router to route all the proxy calls to this message processor/ s only? Will there be any impact on the classificaton tree if we set the above property?

1 4 435
4 REPLIES 4

adas
Participant V

Thats right. This mechanism is known as pitchforking. By setting this property, you can pin the message processirs to a given router such that the router send traffic to those message processors only. This should not have any impact on classification, if you specify multiple uuids the router would continue to load balance between those uuids in round robin fashion.

As per @arghya das load balancing between wired R --MP is taken care (round robin), @Stuart Roberts please let know if the enhancement feature logged still holds good for all (round robin, load average, random).

Can we leverage on the pitchforking feature, on addition to assigning an environment to a perticular dedicated message processor?

adas
Participant V

@asurajpai I am not sure what enhancement you are referring to. The router to mp traffic distribution only happens on round robin basis as far as I can remember. Regarding the concept of dedicating an mp per environment, thats easy. You can add the uuids to a given environment by using the sysadmin api:

POST /v1/o/myorg/e/myenv/servers -d 'uuid=mp-uuid&action=add'

@asurajpai

As discussed, the classification tree is referred to during api execution to understand the mps that are configured for a specific org env combination.

When we create an env, we register a few mps against the env and this is stored as a tree and retrieved at runtime for proxy execution.

However, with regards to the parameter in question : allowed.message.processors

As you are aware, this is a router parameter. What the parameter does is bind a specific mp or a set of mps to a particular router. As Arghya mentions, this is a pitch forking mechanism.

Let me illustrate the distinction between the classification tree and the allowed.message.properties with an example :

For the following setup :

org : testorg

env : test (configured on MP1, MP2, Mp3)

api proxy : testproxy deployed on testorg.test

Router Configured : R1,R2

While executing the above proxy, the classification tree is referred to by the router to understand that MP1, MP2 and Mp3 are configured to handle execution of the proxy.

With this information in hand, the router R1 or R2 (depending on which one gets the request) 'routes' the request in a round-robin manner between the aforementioned MPs (MP1,MP2,MP3).

Now if the allowed.message.processor in R1 has been set to : uuid.MP1

This would mean that when R1 receives the traffic - even though all 3 MPs are available to handle the request - R1 is allowed to pass the request only to MP1.

However, if R2 gets the request, it continues to send it to MP1, MP2,MP3 - as there is no allowed.message.processors set for R2.

For your usecase, there is no need for using the above parameter.

The other thing to remember is that the classification tree holds the fundamental routing information. What the allowed.message.processors does is just provide the flexibility to 'bind' a MP to a router and should be used in contexts where it makes sense.