Lab 11 - Load Balancing

RH_Icon_Compass_Shiny.png In this lab you will configure an HTTP gateway to balance the load of a camel route between a couple of Fuse containers.
  1. In Fuse Management Console, Click on the Containers tab.
  2. Click on the Create button.

  1. Enter “lab11container” as Container Name.
  2. Enter “2” as Number of Containers.
  3. Enter “cxf” in the profiles filter textbox, and select “Example/Camel” -> cxf.
  4. Click on the “Create and start container” button.

  1. Back in the Containers tab, click on the Create button again.
  2. Enter “gateway” as the Container Name.
  3. Enter “gateway” in the profiles filter textbox, and select “http”.
  4. Click on the “Create and start container” button.

general_info_polished.png The Fabric Gateway provides a TCP and HTTP/S gateway for discovery, load balancing and failover of services running in a fabric. The Fabric Gateway enables you to use standard HTTP URLs to access Web applications or Web services running in a fabric. In JBoss Fuse, messaging clients can discover and connect to brokers over any supported messaging protocol (OpenWire, STOMP, MQTT, AMQP or WebSockets), letting the gateway handle the connection management to the real services running inside the fabric.
  1. Click on the icon next to the lab11container1.
  2. Click on the Camel tab.
  3. Click on the fabric-camel-cxf route.
  4. Click on the Source tab.

  1. Add the following text, after“Hello” : “from container 1”.
  2. Click on the Update button.

  1. Close the lab11container1 browser tab.
  2. Back in the Fabric tab, click on the icon next to lab11container2.
  3. Click on the Camel tab.
  4. Click on the fabric-camel-cxf route.
  5. Click on the Source tab.

  1. Add the following text, after“Hello” : “from container 2”.
  2. Click on the Update button.

  1. Close the lab11container2 browser tab.
  2. Open a terminal window.
  3. Execute the following command several times:
curl -d '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:cam="http://camelcxf.examples.fabric8.io/"><soapenv:Header/><soapenv:Body><cam:greet/></soapenv:Body></soapenv:Envelope>&#039; http://localhost:9000/greeter
  1. Notice each execution of the webservice is load balanced by the gateway and answered by a different container.

  2. Back in the browser click on the Containers tab.

  3. Select the gateway and both lab11container containers and click delete.

results matching ""

    No results matching ""