Load Balancer - Wihidum/cep GitHub Wiki
Overview
Load balancer is the component which takes in event streams from sources and send them to necessary nodes of the wihidum distributed system. Load balancer can be configured to reroute incoming events based on various properties of the events. Currently this configuration file should be edited in the load balancer CEP node in order to ensure proper load balancing. We are developing a mechanism to change this configuration using UI of the manager node so that user's won't have to change the configuration file it self but can configure the load balancer from manager node UI.
Major components
Following are the short descriptions of the major components exist in the load balancer. Functionality of these components and how to configure them will be explained thoroughly in the later sections.
- External Event Receiver - This component works as a server socket and listens on a given port waiting for thrift events to arrive. Incoming events are sent to a divider as specified in the load balancer configurations.
- Event Stream Divider (ESD) - This component recieves events from the External Event Receiver and reroutes events based on their stream ID. Events are either sent to a Round Robin divider for further division or sent directly to a CEP node as specified in the load balancer configurations. Note that the ESD send all the events of a single stream to a all the specified recievers resulting sometimes duplication of events.
- Round Robin Divider (RRD) - RRD recieves events either directly from External Event Receiver or from the ESD. Unlike ESD, RRD divides incoming event load among set of specified nodes. Therefore a node recieves only a portion of the total events recieved by the RRD.
- Event Senders for each CEP node - These are merely senders created for each CEP node in the cluster. Dividers forward events to these sender to send events to specified nodes.