Network Config   «Prev  Next»

Load balancing Shared Server - Exercise

Specifying relevant parameters for the Shared Servers

Objective: Define a suitable starting value for Shared Servers.

Exercise scoring

This exercise is worth a total of 10 points. You will receive full credit for creating a setting for Shared Server appropriate to the scenario described below.
  • Background You have been asked to define a set of parameters to create an Shared Server for the dilbert server that contains a single database called fred.
    The end-user community says that there will be an average of 150 TCP/IP connections at any given time, and an average of 50 SPX connections from remote clients. If you like, you may define two listeners for dilbert: one for SPX and one for tcp/ip. Assume that you will not allow more than 50 connections per dispatcher.
  • Instructions Use the template below to create a suitable setting for an Shared Server.
  • Hint There may be more than one correct answer for this exercise because of the dynamic nature of Oracle Net Connections using the Shared Server.

View Code the code below for the template.
# ----------------------
# Shared Server Configuration for dilbert
# ----------------------

# Define dispatchers for TCP/IP and SPX protocols
DISPATCHERS = "(PROTOCOL=TCP)(SERVICE=fred)(DISPATCHERS=3)"
DISPATCHERS = "(PROTOCOL=SPX)(SERVICE=fred)(DISPATCHERS=1)"

# Define listener addresses for both TCP/IP and SPX
LISTENER_TCP_ADDRESS = "(ADDRESS=(PROTOCOL=TCP)(HOST=dilbert)(PORT=1521))"
LISTENER_SPX_ADDRESS = "(ADDRESS=(PROTOCOL=SPX)(HOST=dilbert)(PORT=1522))"

# Set the maximum number of dispatchers (rounding up based on 150 TCP/IP and 50 SPX connections, with a max of 50 connections per dispatcher)
DISPATCHERS_TCP = 3
DISPATCHERS_SPX = 1

# Set maximum number of shared servers (50 SPX connections plus 150 TCP/IP connections)
MAX_SERVERS = 6



Explanation:
  • DISPATCHERS: Defines the number of dispatchers for each protocol. In this case, for TCP/IP (3 dispatchers) and SPX (1 dispatcher), ensuring that there are enough dispatchers for the expected number of connections (max 50 connections per dispatcher).
  • LISTENER_TCP_ADDRESS and LISTENER_SPX_ADDRESS: Define the listener addresses for both TCP/IP and SPX protocols, with different port numbers for each.
  • DISPATCHERS_TCP and DISPATCHERS_SPX: Define the number of dispatchers for each protocol based on the expected average connections. Each dispatcher handles up to 50 connections, so 150 TCP/IP connections need at least 3 dispatchers (150 / 50 = 3). Similarly, 50 SPX connections need 1 dispatcher.
  • MAX_SERVERS: Total number of shared servers. This is based on the sum of connections for both TCP/IP and SPX. With a maximum of 50 connections per server, you will need at least 6 shared servers (150 TCP/IP + 50 SPX = 200 total connections, so 200 / 50 = 4 servers for TCP/IP + 1 server for SPX).

This configuration supports load balancing across two protocols (TCP/IP and SPX) and ensures there are enough dispatchers and shared servers to handle the expected connection load.

Submitting the Execise

Type or paste your answer code into the text box below, then click Submit to submit the exercise and view a results page.