Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Calendar Server Administration Guide 

Chapter 9
Configuring Calendar Lookup Database Plug-in

This chapter describes the Calendar Lookup Database (CLD) plug-in that enables the calendar database to be distributed over multiple back-end servers.

This chapter contains the following topics:


CLD Plug -in Overview

The Calendar Lookup Database (CLD) plug-in provides horizontal scalability of the calendar database by allowing user and resource calendars to be distributed over a number of back-end servers for a single calendar instance. When the calendar database is distributed over several back-end servers, Calendar Server uses the CLD plug-in to determine the actual server where a calendar is stored.

Calendar Server loads the plug-in, depending on the value of the caldb.cld.type parameter in the ics.conf file:

Calendar Server accesses the calendar data on the back-end server using the Database Wire Protocol (DWP). DWP is an internal protocol that runs as the csdwpd service and provides the networking capability for the calendar database.


How the CLD Plug-in Works

Calendar Server accesses calendar data on a back-end server as follows:

  1. When a Calendar Express end user accesses a calendar, the CLD plug-in extracts the userid from the calendar’s calid and then looks up the calendar owner in the LDAP directory database.
  2. After finding the calendar owner, the plug-in uses the value in the icsDWPHost LDAP attribute to determine the host name of the back-end server where the calendar resides. This host name must be resolvable by your Domain Name Service (DNS) into a valid IP address.
  3. Using the host name, Calendar Server accesses the calendar data on the back-end server using the Database Wire Protocol (DWP).
  4. Using DWP, Calendar Server sends the calendar data to the server where the user is logged in, so it can be rendered in one of the user interfaces.

  5. Note

    If your site is using the CLD plug-in, all calendars created for the same user must reside on the same back-end server, as indicated by the LDAP user entry’s icsDWPHost LDAP attribute. If you try to create a calendar on a different back-end server, Calendar Server returns an error.



Configurations for the CLD Plug-in

The CLD plug-in supports the following Calendar Server configurations:

In these configurations, each front-end and back-end server must:

Multiple Front-End Servers with Multiple Back-End Servers

The following figure shows two front-end servers and two back-end servers running a single Calendar Server instance. You can also configure more than two front-end or back-end servers, if you wish.

This configuration allows the servers to be protected by a firewall to restrict access to the LDAP and calendar databases. The calendar database is distributed across the two back-end servers.

The front-end servers are CPU intensive, with most CPU time spent rendering calendar data for end-users. The back-end servers are disk intensive, with most CPU time spent accessing the calendar database.

Figure 9-1  Multiple Front-End Servers with Multiple Back-End Servers

Calendar Server Configuration for Multiple Front-End Servers with Multiple Back-End Servers

Configuring a Front-End Server

To configure a front-end server, set the following parameters in the ics.conf file on each front-end server.

  1. Enable calendar database lookup plug-ins:
  2. csapi.plugin.calendarlookup = "y"

  3. Specify that Calendar Server load all plug-ins:
  4. csapi.plugin.calendarlookup.name = "*"

  5. Set the type of calendar lookup plug-in for the CLD plug-in:
  6. caldb.cld.type = "directory"

  7. Set the port number for the DWP service (csdwpd):
  8. service.dwp.port = "59779"

    The default is “59779”. The port number must be the same for all configured front-end and back-end servers.

  9. Set the server name for each back-end server in the configuration:
  10. caldb.dwp.server.backend-server-1.ip = "backend-server-1"
    caldb.dwp.server.backend-server-2.ip = "backend-server-2"
    ...
    caldb.dwp.server.backend-server-n.ip = "backend-server-n"

    The server name must be fully qualified and be resolvable by your Domain Name Service (DNS) into a valid IP address. In each part of the parameter, the server name must be identical and fully qualified. For example:

    caldb.dwp.server.calendar.sesta.com.ip = "calendar.sesta.com"

    The server name must also match the name used for the icsDWPHost LDAP attribute for the applicable calendar owners.

  11. Set the default DWP server name:
  12. caldb.dwp.server.default = "server-name"

    where server-name is the fully qualified default server name used by Calendar Server if the user or resource entry in the LDAP server database does not have an icsDWPHost attribute. This name must be resolvable by your Domain Name Service (DNS) into a valid IP address. For example:

    caldb.dwp.server.default = "calendar.sesta.com"

  13. Restart Calendar Server for the changes to take effect.

Example Configuration Parameters for a Front-End Server

The following example shows the configuration parameters for a front-end server with two back-end servers named calendar.sesta.com and calendar.siroe.com. The default DWP server is calendar.sesta.com.

Code Example 9-1  LDAP CLD Configuration Parameters for a Front-End Server

service.dwp.port = "59779"
csapi.plugin.calendarlookup = "y"
csapi.plugin.calendarlookup.name = "*"
caldb.cld.type = "directory"
! Default DWP server
caldb.dwp.server.default = "calendar.sesta.com"
! Back-end servers
caldb.dwp.server.sesta.com.ip = "calendar.sesta.com"
caldb.dwp.server.siroe.com.ip = "calendar.siroe.com"

Configuring a Back-End Server

To configure a back-end server, set the following parameters in the ics.conf file on each back-end server.

  1. Enable the DWP service (csdwpd) and set the DWP port number:
  2. service.dwp.enable = "yes"
    service.dwp.port = "59779"

    The default port number is “59779”. The port number must be the same for all configured front-end and back-end servers.

  3. Disable the HTTP service because it is not required on a back-end server (the Admin service should be set to the default value of "yes"):
  4. service.http.enable = "no"
    service.admin.enable = "yes"

  5. Set the type of calendar lookup plug-in for the LDAP CLD plug-in:
  6. caldb.cld.type = "local"

  7. Set csapi.plugin.calendarlookup to "n" because a back-end server does not need to lookup any calendar data:
  8. csapi.plugin.calendarlookup = "n"

  9. Restart Calendar Server for the changes to take effect.

Example Configuration Parameters for a Back-End Server

The following example shows the configuration parameters for a back-end server.

Code Example 9-2  LDAP CLD Configuration Parameters for a Back-End Server

service.dwp.enable = "yes"
service.dwp.port = "59779"
service.http.enable = "no"
service.admin.enable = "yes"
caldb.cld.type = "local"
csapi.plugin.calendarlookup = "n"

Multiple Front-End/Back-End Servers

Figure 9-2 shows three front-end/back-end servers, with each server connected to a calendar database. This configuration allows calendars to be geographically distributed, with each calendar residing on the server where its owner logs into Calendar Server.

Figure 9-2  Multiple Front-End/Back-End Servers

Calendar Server Configuration for Multiple Front-End/Back-End Servers

Configuring a Front End/Back-End Server

To configure a front-end/back-end server, set the following parameters in the ics.conf file on each server.

  1. Enable the DWP service (csdwpd):
  2. service.dwp.enable = "yes"

  3. Set the port number for the DWP service (csdwpd):
  4. service.dwp.port = "59779"

    The default is “59779”. The port number must be the same for all configured front-end and back-end servers.

  5. Enable calendar lookup plug-ins:
  6. csapi.plugin.calendarlookup = "y"

  7. Have Calendar Server load all plug-ins:
  8. csapi.plugin.calendarlookup.name = "*"

  9. Specify the type of calendar lookup plug-in that Calendar Server should use:
  10. caldb.cld.type = "directory"

  11. Set the default DWP server name:
  12. caldb.dwp.server.default = "server-name"

    where server-name is the fully qualified default server name used by Calendar Server if the user or resource entry in the LDAP server database does not have an icsDWPHost attribute. This name must be resolvable by your Domain Name Service (DNS) into a valid IP address. For example:

    caldb.dwp.server.default = "calendar.sesta.com"

  13. Set the server name for all front-end/back-end servers in the configuration, including the local server:
  14. caldb.dwp.server.server-1.ip = "server-1"
    caldb.dwp.server.server-2.ip = "server-2"
    ...
    caldb.dwp.server.server-n.ip = "server-n"

    The server name must be fully qualified and be resolvable by your Domain Name Service (DNS) into a valid IP address. In each part of the parameter, the server name must be identical and fully qualified. For example:

    caldb.dwp.server.calendar.sesta.com.ip = "calendar.sesta.com"

    The server name must also match the name used for the icsDWPHost LDAP attribute for the applicable calendar owners.

  15. Restart Calendar Server for the changes to take effect.

Example Configuration Parameters for Each Front-End/Back-End Server

The following example shows the configuration parameters for each front-end/back-end server. The servers are sesta.com, siroe.com, and varrius.com. The default DWP server is sesta.com.

Code Example 9-3  LDAP CLD Configuration Parameters for Each Front-End/Back-End Server

service.dwp.enable = "yes"
service.dwp.port = "59779"
csapi.plugin.calendarlookup = "y"
csapi.plugin.calendarlookup.name = "*"
caldb.cld.type = "directory"
! Default DWP server
caldb.dwp.server.default = "calendar.sesta.com"
! Back-end servers
caldb.dwp.server.calendar.sesta.com.ip = "calendar.sesta.com"
caldb.dwp.server.calendar.siroe.com.ip = "calendar.siroe.com"
caldb.dwp.server.calendar.varrius.com.ip = "calendar.varrius.com"

 


Maintaining Security Between Front-End and Back-End Servers

A front-end server uses the Database Wire Protocol (DWP) to communicate with a back-end server. Because DWP uses HTTP as the transport mechanism, Calendar Server provides authentication for DWP connections between front-end and back-end servers using the configuration parameters in Table 9-1 and Table 9-2.

These parameters are optional and by default are not included in the ics.conf file. To use authentication for DWP connections, you must add the required parameters to the ics.conf file on each front-end and back-end server.

Table 9-1  Back-end Configuration Parameters for Authentication of a DWP Connection

Parameter

Description

service.dwp.admin.userid

On a back-end server, specifies the user ID that is used to authenticate a DWP connection. If a back-end server does not specify a user ID, no authentication is performed.

service.dwp.admin.cred

On a back-end server, specifies the password that is used to authenticate a DWP connection. If a back-end server does not specify a password, no authentication is performed.

Table 9-2  Front-end Configuration Parameters for Authentication of a DWP Connection

Parameter

Description

caldb.dwp.server.back-end-server.admin

On a front-end server, specifies the user ID that is used for authentication for a DWP connection to a back-end server, where back-end-server is the name of the server.

caldb.dwp.server.back-end-server.cred

On a front-end server, specifies the password that is used for authentication for a DWP connection to a back-end server, where back-end-server is the name of the server.

Setting Up Authentication for DWP Connections

To set up the authentication for DWP connections between front-end and back-end servers, follow these steps:

  1. In the ics.conf file on each front-end server, add these parameters:
  2. caldb.dwp.server.back-end-server.admin = "userid"
    caldb.dwp.server.back-end-server.cred = "password"

    where back-end-server is the name of the back-end server and userid and password are the user ID and password you want Calendar Server to use to authenticate the connection.

  3. In the ics.conf file on each back-end server indicted by back-end-server, add these parameters:
  4. service.dwp.admin.userid = "userid"
    service.dwp.admin.cred = "password"

    where userid and password are the same user ID and password you specified on the front-end server.

When the front-end server first connects to the back-end server, it sends the user ID and password specified by the parameters. The back-end server checks the parameters, and if both parameters match, the authentication is successful. The back-end server then sends a session ID back to the front-end server. The front-end server uses the session ID in subsequent DWP commands to the back-end server.

Subsequent connections from the same front-end server do not need to be authenticated again, unless:

If you have multiple front-end and back-end server, you can use the same user ID and password for each one.

If a back-end server does not specify a user ID and password, no authentication is performed.


Improving Performance of the CLD Plug-in

To improve the performance of Calendar Server with the CLD plug-in, make sure the following configuration parameters are set to “yes” (the default value for each parameter):

For more information on improving performance, see Chapter 19, "Tuning Calender Server Performance."


Clearing the CLD Cache

If you are using the CLD cache option and you have updated a server name for an ics.conf parameter or moved a calendar to a different back-end server, you should clear the CLD cache to remove the server names. An out-of-date entry in the CLD cache can prevent a front-end server from establishing a connection to the correct back-end server or cause Calendar Server not to find a calendar after it have been moved.

To clear the CLD cache, follow these steps:

  1. Stop Calendar Server.
  2. Remove all files in the cal_svr_base/var/opt/SUNWics5/csdb/cld_cache directory, but do not remove the cld_cache directory itself.
  3. Restart Calendar Server.


Moving a Calendar to a Different Back-End Server

To move a user or resource calendar from one back-end server to another back-end server, follow these steps:

  1. On the original server, disable the calendar user using the csuser utility for a user calendar or csresource for a resource calendar. For example to disable the user with the user ID and calid bkamdar:
  2. csuser disable bkamdar

  3. On the original server, export the calendar from the calendar database to a file using the csexport utility. For example:
  4. csexport -c bkamdar calendar bkamdar.ics

    If a user has more than one calendar, you must perform this step for each calendar.

  5. Copy the exported calendar (*.ics) files from the original server to the new server.
  6. On the new server, import the calendar from the file to the calendar database using the csimport utility. For example:
  7. csimport -c bkamdar calendar bkamdar.ics

    Again, you must perform this step for each of the calendars you exported.

  8. On the LDAP directory server, update the calendar owner’s icsDWPHost LDAP attribute to point to the new back-end server using the csattribute utility. To update an attribute, you must first delete the attribute and then add it with the new value. For example, to set the new server name to sesta.com:
  9. csattribute -a icsDWPHost delete bkamdar
    csattribute -a icsDWPHost=sesta.com add bkamdar

  10. On the new server, enable the calendar user using the csuser utility for a user calendar or csresource for a resource calendar. For example:
  11. csuser enable bkamdar

  12. On the new server, use the following commands to verify that the attributes are correct and that each calendar has been moved correctly. For example:
  13. cscal -v -o bkamdar list bkamdar
    ...
    csattribute -v list bkamdar

  14. On the original server, delete each calendar you just moved. For example:
  15. cscal -o bkamdar delete bkamdar

    The -o option deletes all calendars whose primary owner is bkamdar.



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.