web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
Chapter 7 Chapter7Clustering web components This section discusses the clustering of multiple web components which includes Apache web servers and the Tomcat-based Borland web containers. In a typical deployment scenario, you can use multiple Borland Partitions to work together in providing a scalable n-tier solution. Each Borland Partition can have the same or different services. Depending on your clustering scheme, these services can be turned off or on. In any case, leveraging these resources together or clustering, makes deployment of your web application more efficient. Clustering of the web components involves session management, load balancing and fault tolerance (failover). Stateless and stateful connection services Important Interaction between the client and server involves two types of services: stateless and stateful. A stateless service does not maintain a state between the client and the server. There is no “conversation” between the server and the client while processing a client request. In a stateful service, the client and server maintains a dialog of information. For information about the location of the Borland web container configuration files, go to Chapter 4, “Web components.” For documentation updates, go to www.borland.com/techpubs/bes. The Borland IIOP connector The IIOP connector is software that is designed to allow an http web server to redirect requests to the Borland web container. The Borland Enterprise Server includes the IIOP connector for the Apache 2.0 and Microsoft Internet Information Server (IIS) versions 5.0, 5.1 and 6.0 web servers. The job of handling the redirection of http requests is split between two components: ■ ■ a native library running on the web server. a jar file running of the web container. Chapter 7: Clustering web components 61
The Borland IIOP connector BES supports clustering of web components. The Borland IIOP connector uses the IIOP protocol. The following unique features are provided: ■ “Load balancing support” on page 62 ■ “Fault tolerance (failover)” on page 63 ■ “Smart session handling” on page 63 Load balancing support Load balancing is the ability to direct http requests across a set of web containers. This enables the system administrator to spread the load of the http traffic across multiple web containers. Load balancing techniques can significantly improve the scalability of a given system. The Borland IIOP connector can be configured to offer load balancing in the following two ways: ■ “OSAgent based load balancing” on page 62 ■ “Corbaloc based load balancing” on page 62 Important Note OSAgent based load balancing This is simple to achieve and requires the least amount of configuration. In this setup, you start a number of Borland web container instances and name the IIOP connector in those Borland web container with the same name. For more information about setting the name attribute, go to Chapter 5, “Web server to web container connectivity.” Apache does load balancing across Borland web container instances for each request. Essentially, Apache does a new bind for each request. The newly started Borland web container containers can be dynamically discovered. All Borland web containers and Apache must be running in the same ORB domain; osagent based load balancing is not possible in cases where you are using different Partitions on different ORB domains. Corbaloc based load balancing This approach uses a static configuration of the web containers that make up the cluster. However, it can span ORB domains. In this case you specify the locations where the web containers are running using the CORBA corbaloc semantics. For example: corbaloc::172.20.20.28:30303,:172.20.20.29:30304/tc_inst1 In the above corbaloc example string: ■ two TCP/IP endpoints are configured for a web container named “tc_inst1” ■ a web container with an object name of “tc_inst1” is running on host 172.20.20.28 with its IIOP connector at port 30303 ■ there is another web container running with the same object name on host 172.20.20.29 with it's IIOP connector listening on port 30304. For more information about setting the port attribute, go to Chapter 5, “Web server to web container connectivity.” The web server side IIOP connector converts this corbaloc string into CORBA objects using orb.string_to_object and uses the underlying features of VisiBroker to load balance across these “endpoints” specified in the corbaloc string. There can be any number of endpoints. All of the listed web containers do not have to be running for the load balancing to function. The ORB simply moves on to the next endpoint until a valid connection is obtained. 62 BES Developer’s Guide
- Page 21 and 22: The Partition and its services ■
- Page 23 and 24: Borland Enterprise Server and J2EE
- Page 25 and 26: 14 BES Developer’s Guide
- Page 27 and 28: Creating Partitions Creating Partit
- Page 29 and 30: Running Partitions Table 3.1 Option
- Page 31 and 32: Configuring Partitions You can also
- Page 33 and 34: JMX support in Partitions ■ ■ A
- Page 35 and 36: JMX support in Partitions Figure 3.
- Page 37 and 38: Thread pools Partition properties r
- Page 39 and 40: 28 BES Developer’s Guide
- Page 41 and 42: Apache web server implementation Fo
- Page 43 and 44: Borland web container implementatio
- Page 45 and 46: Borland web container implementatio
- Page 47 and 48: Borland web container implementatio
- Page 49 and 50: Smart Agent implementation Smart Ag
- Page 51 and 52: 40 BES Developer’s Guide
- Page 53 and 54: Apache web server to Borland web co
- Page 55 and 56: Apache web server to Borland web co
- Page 57 and 58: Apache web server to Borland web co
- Page 59 and 60: Large data transfer Downloading lar
- Page 61 and 62: Large data transfer Uploading large
- Page 63 and 64: IIS web server to Borland web conta
- Page 65 and 66: IIS web server to Borland web conta
- Page 67 and 68: IIS web server to Borland web conta
- Page 69 and 70: Session management with JSS If an i
- Page 71: Managing and configuring the JSS Co
- Page 75 and 76: Setting up your web container with
- Page 77 and 78: 66 BES Developer’s Guide
- Page 79 and 80: Web-enabling your CORBA server Impo
- Page 81 and 82: Configuring your Apache web server
- Page 83 and 84: Configuring your Apache web server
- Page 85 and 86: Web Services and Partitions ■ ■
- Page 87 and 88: Web Service providers Java:RPC prov
- Page 89 and 90: How Borland Web Services work
- Page 91 and 92: Packaging Web Service Application A
- Page 93 and 94: Tools Overview Java2WSDL tool Note
- Page 95 and 96: 84 BES Developer’s Guide
- Page 97 and 98: Client view of an enterprise bean L
- Page 99 and 100: Client view of an enterprise bean E
- Page 101 and 102: Managing transactions Managing tran
- Page 103 and 104: Support for JNDI Support for JNDI T
- Page 105 and 106: EJB to CORBA mapping A CORBA progra
- Page 107 and 108: 96 BES Developer’s Guide
- Page 109 and 110: Application Client architecture Pac
- Page 111 and 112: Document Type Definitions (DTDs) my
- Page 113 and 114: Support of references and links The
- Page 115 and 116: Use of Manifest files Use of Manife
- Page 117 and 118: 106 BES Developer’s Guide
- Page 119 and 120: Sessions in secondary storage If yo
- Page 121 and 122: 110 BES Developer’s Guide
The <strong>Borland</strong> IIOP connector<br />
BES supports clustering of <strong>web</strong> components. The <strong>Borland</strong> IIOP connector uses the<br />
IIOP protocol. The following unique features are provided:<br />
■<br />
“Load balancing support” on page 62<br />
■<br />
“Fault tolerance (failover)” on page 63<br />
■<br />
“Smart session handling” on page 63<br />
Load balancing support<br />
Load balancing is the ability to direct http requests across a set of <strong>web</strong> containers. This<br />
enables the system administrator to spread the load of the http traffic across multiple<br />
<strong>web</strong> containers. Load balancing techniques can significantly improve the scalability of<br />
a given system. The <strong>Borland</strong> IIOP connector can be configured to offer load balancing<br />
in the following two ways:<br />
■<br />
“OSAgent based load balancing” on page 62<br />
■<br />
“Corbaloc based load balancing” on page 62<br />
Important<br />
Note<br />
OSAgent based load balancing<br />
This is simple to achieve and requires the least amount of configuration. In this setup,<br />
you start a number of <strong>Borland</strong> <strong>web</strong> container instances and name the IIOP connector in<br />
those <strong>Borland</strong> <strong>web</strong> container with the same name.<br />
For more information about setting the name attribute, go to Chapter 5, “Web <strong>server</strong> to<br />
<strong>web</strong> container connectivity.”<br />
Apache does load balancing across <strong>Borland</strong> <strong>web</strong> container instances for each request.<br />
Essentially, Apache does a new bind for each request. The newly started <strong>Borland</strong> <strong>web</strong><br />
container containers can be dynamically discovered.<br />
All <strong>Borland</strong> <strong>web</strong> containers and Apache must be running in the same ORB domain;<br />
osagent based load balancing is not possible in cases where you are using different<br />
Partitions on different ORB domains.<br />
Corbaloc based load balancing<br />
This approach uses a static configuration of the <strong>web</strong> containers that make up the<br />
cluster. However, it can span ORB domains. In this case you specify the locations<br />
where the <strong>web</strong> containers are running using the CORBA corbaloc semantics. For<br />
example:<br />
corbaloc::172.20.20.28:30303,:172.20.20.29:30304/tc_inst1<br />
In the above corbaloc example string:<br />
■<br />
two TCP/IP endpoints are configured for a <strong>web</strong> container named “tc_inst1”<br />
■<br />
a <strong>web</strong> container with an object name of “tc_inst1” is running on host 172.20.20.28<br />
with its IIOP connector at port 30303<br />
■<br />
there is another <strong>web</strong> container running with the same object name on host<br />
172.20.20.29 with it's IIOP connector listening on port 30304.<br />
For more information about setting the port attribute, go to Chapter 5, “Web <strong>server</strong> to<br />
<strong>web</strong> container connectivity.”<br />
The <strong>web</strong> <strong>server</strong> side IIOP connector converts this corbaloc string into CORBA objects<br />
using orb.string_to_object and uses the underlying features of VisiBroker to load<br />
balance across these “endpoints” specified in the corbaloc string. There can be any<br />
number of endpoints.<br />
All of the listed <strong>web</strong> containers do not have to be running for the load balancing to<br />
function. The ORB simply moves on to the next endpoint until a valid connection is<br />
obtained.<br />
62 BES Developer’s Guide