Monday, 19 August 2013

How to replicate state update to all the nodes in middle-ware cluster?

How to replicate state update to all the nodes in middle-ware cluster?

I am developing a middle-ware components that receives a stream of
self-contained events. If event corresponds to a business rule a
notification is generated. A system outgrew vertical scaling and it is now
scaled horizontally. There is a now a cluster of middle-ware components
and events are distributed via network load balancer. A single component
can handle CRUD (Create, Read, Update, Delete) operations with rules.
The state I need to sync is the business rules. A business rule looks like
a couple of lines of text. The rules are only changed infrequently. Also
the rules are stored in a distributed database and are loaded into the
component on restart.
The problem
I need to push CRUD changes to all the nodes in a cluster, but through the
current API (web service) I can only update state of a single middle-ware
component.
Question
What are my options to push state change into the cluster of middle-ware
components?
My thoughts
Access API through a load balancer and make load balancer to dispatch the
same call to all the nodes in a cluster
Make nodes in a cluster aware of the cluster and embed a replication
mechanism
Add a table to a database and store last update date, make components poll
for the data and force an update if needed
I would prefer #1, as it seems the easiest thing to do, though consistency
would become an issue (in case one node fails). Any advice on this is
welcome.

No comments:

Post a Comment