COM+ LOAD BALANCING
Computer Call
April 08, 1999
AGENDA
• Goals and requirements
• Semantics and programming model
• Topology
• Architecture
• Installation and Admin issues
• Availability
• How does this relate to Valence/Convoy?
GOALS
• Improved scalability
• Increased application throughput by adding servers
• Improved availability
• Applications can tolerate server failure
• Server failures are transparent to clients
• Compose with clustering and WLBS
• Complimentary technologies
Client
Server
Router Server
Server
Response Time
Tracker
Application
Cluster
REQUIREMENTS
• Support for COM/MTS components
• Cluster size of up to 8 nodes (tested config)
• Extensible load balancing policy
• User-pluggable routing mechanism
• Support for multiple simultaneously managed components
SEMANTICS
• Granularity is at the class level
• User explicitly marks class to be
load balanced
• Load Balancing at:
• Object creation time
• JIT activation time at a future release
• Load Balancing engine associated with class
• Default: response time engine
PROGRAMMING MODEL
• Creating Load-Balance’able components
• Design for short lived instances
• Explicitly manage state
• Store in DB across creation boundaries
• No node affinity
• Component shouldn’t assume creation on a specific node
• E.g., don’t depend on a specific file on a particular node
CLIENT PROGRAMMING MODEL
• Client applications
• Create and release references to objects
• Short lived server components
• Load balancing happens on creation boundary in COM+ 1.0 (and not JIT)
Clients
Load Balancing
Routers
Application
Servers Configuration
One Application
Cluster
LOAD BALANCING - THE PLAYERS
NodeB
NodeA
NodeC
Application
Application Cluster
A set of servers
used to run a set of
applications
Application Cluster
A set of servers
used to run a set of
applications
Application
A collection of
COM classes
Application
A collection of
COM classes
Load Balancing
Router
Special node that
routes work to nodes
in an application
cluster
Load Balancing
Router
Special node that
routes work to nodes
in an application
cluster
Clients
Load Balancing
Routers
Application
Servers Configuration
One Application
Cluster
NodeB
NodeA
NodeC
The
load balancing router
is associated with the
application cluster
The
load balancing router
is associated with the
application cluster
Application
The application is
installed into the
application cluster
The application is
installed into the
application cluster
Client uses router as
remote server name
Client uses router as
remote server name
LOAD BALANCING
CONFIGURATION
Clients
Load Balancing
Routers
Application
Servers Configuration
One Application
Cluster
LOAD BALANCING - INVOCATION
NodeB
NodeA
NodeC
Application
CCI (CFoo)
TOPOLOGY
• Applications are:
• Collections of COM classes
• Installed on application clusters
• An application cluster
• Is a collection of servers
• Is associated with one load balancing component router
TOPOLOGY
• Clients
• Set creation requests to be forwarded to the load balancing router
machine
• Load balancing component router maintains information about the
servers
• Component Routers accommodate transient and permanent
failures in application servers
APPLICATIONS AND INSTALLATION
• Can be load balanced [YES/NO]
• Default - NO
• If the application is load balanced
• The client side package will have the RemoteServerName entry points to
the load balancing router machine
Client
Server
Load Balancing
Router
Load Balancing Service
Service Control
Manager
(SCM)
Shared
Memory
Shared
Memory
ARCHITECTURE-1
ARCHITECTURE-2
Client
Server
Load Balancing
Router
Service Control
Manager
(SCM)
Load Balancing Service
Catalog
...
Load Bal
Routing
Tables
Service
Load Balancing List
... ...
GUID1
GUID2
GUIDN
Targ-1
Targ-2
Targ-N
Eng-1
Eng-2
Eng-N
...
Engine
Engine
ARCHITECTURE-3
IFoo
Class Fact
DCOM
CoCI
Client
Server
Load Balancing
Router
Service Control
Manager
(SCM)
Load Balancing Service
Activator
Load Bal
Routing
Tables
DCOM
Interceptor
IFoo
ARCHITECTURE-4
Load Balancing Service
Catalog
...
Load Bal
Routing
Tables
Service
Load Balancing List
... ...
GUID1
GUID2
GUIDN
Targ-1
Targ-2
Targ-N
Eng-1
Eng-2
Eng-N
...
Engine
IFoo
CoCI
Client
Server
Load Balancing
Router
Service Control
Manager
(SCM) Load Bal
Routing
Tables
IFoo
Interceptor
Response
Time Stats
Response
Time Mgr
Engine
ROUTER STARTUP
• Spin off supervisor
• Initialize and load the catalog
• Obtain servers in application cluster
• Obtain classes and associated servers
• Create shared memory table
• Create and initialize load balancing engine(s); the engine:
• Creates worker threads
• Creates a remote instance of a response time server
CREATING AN INSTANCE
• Client request forwarded to
router SCM
• Router SCM calls activator
• Activator reads shared memory and determines server to
use
• MachineName is updated and activator delegates
• Emergency recovery is initiated if failures are
encountered
HANDLING SERVER DOWN
• Activator marks server as down and triggers target down on
engine
• Engine responsible to replace with new target (or NULL if cluster
down)
• Analyzers and load balancing engines
• Responsible for declaring a server to be up again
• Assume that the server is down until a remote creation of the response time
server succeeds
• Unhandled: scheduled downtimes
ROUTER AVAILABILITY
• Router is single point of failure
• Can be configured as a Cluster (MSCS) resource
• Node failure results in router service being instantiated on second
node
HOW THIS RELATES TO…
• Valence/Convoy (WLBS)
• Complimentary
• Use COM+ Load Balancing for fine grained dynamic control of applications
• Compose
• Can be used together for a highly scalable configuration
• Same programming model
• No node affinity; careful
state management
SUMMARY
• Load Balancing for
COM/MTS components
• Cluster size of up to 8 nodes
• Designed for extensibility
• High availability architecture
• Support for multiple simultaneously managed components
CALL TO ACTION
• Build your server applications to be scalable using COM+ Load
Balancing
• Careful design and choice of mechanisms
• Explicit design with component state
• Build client applications to use scalable server applications
• Create, use and release server objects
• Retry on failure
QUESTIONS?
Implementing Load Balancing in COM+ Applications

Implementing Load Balancing in COM+ Applications

  • 1.
    COM+ LOAD BALANCING ComputerCall April 08, 1999
  • 2.
    AGENDA • Goals andrequirements • Semantics and programming model • Topology • Architecture • Installation and Admin issues • Availability • How does this relate to Valence/Convoy?
  • 3.
    GOALS • Improved scalability •Increased application throughput by adding servers • Improved availability • Applications can tolerate server failure • Server failures are transparent to clients • Compose with clustering and WLBS • Complimentary technologies
  • 4.
    Client Server Router Server Server Response Time Tracker Application Cluster REQUIREMENTS •Support for COM/MTS components • Cluster size of up to 8 nodes (tested config) • Extensible load balancing policy • User-pluggable routing mechanism • Support for multiple simultaneously managed components
  • 5.
    SEMANTICS • Granularity isat the class level • User explicitly marks class to be load balanced • Load Balancing at: • Object creation time • JIT activation time at a future release • Load Balancing engine associated with class • Default: response time engine
  • 6.
    PROGRAMMING MODEL • CreatingLoad-Balance’able components • Design for short lived instances • Explicitly manage state • Store in DB across creation boundaries • No node affinity • Component shouldn’t assume creation on a specific node • E.g., don’t depend on a specific file on a particular node
  • 7.
    CLIENT PROGRAMMING MODEL •Client applications • Create and release references to objects • Short lived server components • Load balancing happens on creation boundary in COM+ 1.0 (and not JIT)
  • 8.
    Clients Load Balancing Routers Application Servers Configuration OneApplication Cluster LOAD BALANCING - THE PLAYERS NodeB NodeA NodeC Application Application Cluster A set of servers used to run a set of applications Application Cluster A set of servers used to run a set of applications Application A collection of COM classes Application A collection of COM classes Load Balancing Router Special node that routes work to nodes in an application cluster Load Balancing Router Special node that routes work to nodes in an application cluster
  • 9.
    Clients Load Balancing Routers Application Servers Configuration OneApplication Cluster NodeB NodeA NodeC The load balancing router is associated with the application cluster The load balancing router is associated with the application cluster Application The application is installed into the application cluster The application is installed into the application cluster Client uses router as remote server name Client uses router as remote server name LOAD BALANCING CONFIGURATION
  • 10.
    Clients Load Balancing Routers Application Servers Configuration OneApplication Cluster LOAD BALANCING - INVOCATION NodeB NodeA NodeC Application CCI (CFoo)
  • 11.
    TOPOLOGY • Applications are: •Collections of COM classes • Installed on application clusters • An application cluster • Is a collection of servers • Is associated with one load balancing component router
  • 12.
    TOPOLOGY • Clients • Setcreation requests to be forwarded to the load balancing router machine • Load balancing component router maintains information about the servers • Component Routers accommodate transient and permanent failures in application servers
  • 13.
    APPLICATIONS AND INSTALLATION •Can be load balanced [YES/NO] • Default - NO • If the application is load balanced • The client side package will have the RemoteServerName entry points to the load balancing router machine
  • 14.
    Client Server Load Balancing Router Load BalancingService Service Control Manager (SCM) Shared Memory Shared Memory ARCHITECTURE-1
  • 15.
    ARCHITECTURE-2 Client Server Load Balancing Router Service Control Manager (SCM) LoadBalancing Service Catalog ... Load Bal Routing Tables Service Load Balancing List ... ... GUID1 GUID2 GUIDN Targ-1 Targ-2 Targ-N Eng-1 Eng-2 Eng-N ... Engine Engine
  • 16.
    ARCHITECTURE-3 IFoo Class Fact DCOM CoCI Client Server Load Balancing Router ServiceControl Manager (SCM) Load Balancing Service Activator Load Bal Routing Tables DCOM Interceptor IFoo
  • 17.
    ARCHITECTURE-4 Load Balancing Service Catalog ... LoadBal Routing Tables Service Load Balancing List ... ... GUID1 GUID2 GUIDN Targ-1 Targ-2 Targ-N Eng-1 Eng-2 Eng-N ... Engine IFoo CoCI Client Server Load Balancing Router Service Control Manager (SCM) Load Bal Routing Tables IFoo Interceptor Response Time Stats Response Time Mgr Engine
  • 18.
    ROUTER STARTUP • Spinoff supervisor • Initialize and load the catalog • Obtain servers in application cluster • Obtain classes and associated servers • Create shared memory table • Create and initialize load balancing engine(s); the engine: • Creates worker threads • Creates a remote instance of a response time server
  • 19.
    CREATING AN INSTANCE •Client request forwarded to router SCM • Router SCM calls activator • Activator reads shared memory and determines server to use • MachineName is updated and activator delegates • Emergency recovery is initiated if failures are encountered
  • 20.
    HANDLING SERVER DOWN •Activator marks server as down and triggers target down on engine • Engine responsible to replace with new target (or NULL if cluster down) • Analyzers and load balancing engines • Responsible for declaring a server to be up again • Assume that the server is down until a remote creation of the response time server succeeds • Unhandled: scheduled downtimes
  • 21.
    ROUTER AVAILABILITY • Routeris single point of failure • Can be configured as a Cluster (MSCS) resource • Node failure results in router service being instantiated on second node
  • 22.
    HOW THIS RELATESTO… • Valence/Convoy (WLBS) • Complimentary • Use COM+ Load Balancing for fine grained dynamic control of applications • Compose • Can be used together for a highly scalable configuration • Same programming model • No node affinity; careful state management
  • 23.
    SUMMARY • Load Balancingfor COM/MTS components • Cluster size of up to 8 nodes • Designed for extensibility • High availability architecture • Support for multiple simultaneously managed components
  • 24.
    CALL TO ACTION •Build your server applications to be scalable using COM+ Load Balancing • Careful design and choice of mechanisms • Explicit design with component state • Build client applications to use scalable server applications • Create, use and release server objects • Retry on failure
  • 25.