Docstoc

LOAD BALANCING

Document Sample
LOAD BALANCING Powered By Docstoc
					 COM+ Load
  Balancing
     and
Object Pooling
Objectives
 Understand

      Load balancing technologies in general

      Component Load Balancing in particular
Contents

   Object Pooling
   What Is Load Balancing?
   Load Balancing Alternatives
   CLB—Component Load Balancing
   Do’s and Don’ts
   Summary
COM+ Object Pooling 1/2

   Component instances
   Share the cost of                            Create

       Expensive initialization
   Based on activation/deactivation             Activate

   Single object pool per component
                                                Deactivate
   Specify minimum and maximum pool size
   Requirements for poolable objects
       Must be 100% stateless                   Destroy

       No thread affinity (not possible with
        Microsoft® Visual Basic®
COM+ Object Pooling 2/2

                         Min: 3, Max: 4
            Pool
           Manager
 Client
 request
             Queue




                     active

                     inactive
COM+ Load Balancing 1/2

 Transparently   distribute
 Transparently   implement
COM+ Load Balancing 2/2

 How   does it relate to other technologies?
 WLBS   (Windows Load Balancing Service)
 Windows   clustering
          (Microsoft Message Queue Server
 Auctioning
 (MSMQ) and Microsoft Transaction Server (MTS))
Load Balancing Definition

 Work   is divided
 Architecture   defines balanced unit of work
Load Balancing Approaches

 Static   LB
       Early bound
       Course-grained
       Admin intensive
       Not responsive to server failures and restart
 Dynamic       LB
       Late bound
       Finer-grained
       Better workload distribution
       More responsive to server failures and restart
CLB Architecture
 Granularity   is at the class level
 User    explicitly marks class to be load balanced
 Load    balancing at object creation time
      Not just-in-time (JIT)




                                                       Application cluster
                                         Server


 Client                Router            Server


                                         Server
                    Response time
                       Tracker
 CLB - Configuration
                                                            The application is
                                                             installed into the
                                                            application cluster



                                           NodeA



Client uses router as                 NodeB                   Application
remote server name



                                            NodeC
                                       One Application
                                             The
                                   load balancing router
                                           Cluster
                                   is associated with the
                                    application cluster
                  Load balancing      Application
 Clients             routers           servers              Configuration
      CLB Invocation
CreateObject(“Order”)


                                         NodeA



                                     NodeB              Application




                                          NodeC
                                     One Application
                                         Cluster

                    Load balancing   Application
      Clients          routers        servers          Configuration
CLB Programming Model
 Activations   are load balanced

 Client   is bound to a single server

 MTS   applications will load balance

 Doesn’t   change programming model
CLB Algorithm 1/2
 Hybrid    of response time/round robin

 Cluster   machines

 LB   server orders

 LB   server round robins
CLB Algorithm 2/2
 Short   polling interval

 Long    polling interval

 Load    balancing server
CLB Tuning
 LB    server

 Limit

       To number of activations a machine can route
       Affected by LB server == application server
CLB Configuration
 Number   of machines usable in a cluster is limited:
     Processing power of cluster members
     Relative weight of component
     Activation ratio
     Whether LB server is also an application server
CLB Service 1/3

 Workhorse

 Windows     NT service
 Maintains   a list of:
      All classes
      All servers
      Load balancing engine
 Loads   and initializes the load balancing engines
CLB Service 2/3
 Load   balancing recommendations

 ISetTarget


 Engine   free to call ISetTarget
           CLB Service 3/3
Client Machine                                                           Machine
                                                                  Router m                                                                   Application Server Machine

                                                                           SCM
                 CoCreate (RSN=…)
 COM Client                                                                                                                                 Application Package (Process)
                                                                        Registered as SCM activator
                  Method                       Called by SCM                                           RSN = …
                  Call                                                    COM LBActivator                 &                                               COM Class
                                                 ISystemActivator                                      Delegate                          IClassFactory
                                                                                              Read
                                                                                                                                                                  COM Object
                                                  Emergency update event                Shared Memory                                                    IFoo


                                                            Load Balancing Service                    Write                                                        Tracking
                                                                                                                                      Called by COM                 Policy
                                                                 ServerGroup                Reporter
                                               IEnuTarget
                                                                                                      ISetTarget
                                         Main Thread                       Server                                                                                RespTime
                                                            ITarget                                                                    IResponseTimeTracker
                                                   Create
                                                                                                                                                                           Write
                                                                               RespTime
                                               ILoadBalancingEngine                            Shared Data
                                                                                                                                                                Shared Memory
                                                                  Resp TimeThread (s)                                Bulk data xfer
                                                                                                                                                COM System Package
                                                                                                                                                                           Read


                                                               COM System Package
                                                                                                                                                                RespTime
                                                                                                                                       IResponseTimeServer
                                                                          Catalog
                                               ILBRouterCatalog



 COM specific        Load balancing algorithm specific,               Replacable by clients for specific domains (e.g. IIS)
                     can be used by different clients
Applications and Installation
 Load   balanced [ YES / NO (Default)]
 Application   cluster:
      All classes
      Associated catalog
 Application   is load balanced
      RemoteServerName entry points
Handling Server Down
 Activator


 Engine


 Analyzers   and load balancing engines

 Unhandled:   Scheduled downtimes
Do’s and Don’ts
 Bind   late

 Release       early

 Use    Pooling for “heavy” components

 Choose    appropriate LB technology
Summary

 COM+    provides easy to configure
      Pooling
      CLB
 Both   are design issues
Questions




   Presentation
      Layer

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:6
posted:2/13/2012
language:
pages:25