Intro
- High availability AND Scaling
- How to?
- Vertical scaling
- Horizontal scaling - have a load balancer
- Clustering for the scalability
- nodes should be stateless
- Clustering for availability
- Session/state replication
- TCP communication is involved. TCP communication is done via sockets. So it requires IP/port for each member node.
- Static membership - can't add nodes without restarting the cluster
- Dynamic membership - nodes can join/leave
- Hybrid membership - dynamic nodes revolves around the static members
1. Multicast based membership mgt
- After the discovery, communication is happening p2p
- Only for testing purposes
- no need of public channel
- At-least 2 well-known members
- Well-known members notify the newly joined dynamic members
- In cloud and internet you can't multicast, so WKA is preferred
- Hazlecast, apache tribes handles membership mgt
- Hazlecast
- Clustering and highly scalable data distribution
- Partitions the data-> in-memory data grid which is distributed too
- Auto-scaling
- allocation/deallocation of nodes based on the current load
- Deployment types
- Single node
- Primary-secondary
- Have a secondary node in case of primary node failures
- Primary-secondary with multiple LB
- multi datacenters
- Management and Worker nodes separation
- Management nodes controls the cluster, upload artifacts, do the management work etc.
- Workers perform the main work, shouldn't do any mgt work
- This Separation is done using sub domains, mainly routing the requests based on it
- A usecase- deployment synchronization
- Caching- when expensive data transfers to be done
- JCache
- Only HTTP traffic, not TCP
- Proxy port
- When multiple HTTP/HTTPs ports are there portmapping should be done - axis2.xml
- Tenant-aware LB
- tenant partitioning - define a tenant range
- LB routes the tenant requests to the relevant cluster based on the tenant range
- Private Jet Mode - dont share the resources with others - done using tenant range
- loadbalancer.conf
LB Cluster
In case of failure of LB node, secondary node has to learn from the beginning. To avoid this state replication is done.
No comments:
Post a Comment