Priming the global indexes on startup
The PingDirectoryProxy server can prime the global indexes at startup from the backend directory server or from a peer proxy server, preferably one that resides on the same LAN or subnet.
When priming occurs locally, you can avoid WAN bandwidth consumption and reduce the processing load on the directory servers in the topology. You can specify the data sources for the index priming and the order in which priming occurs from these sources. Use the prime-index-source
property to specify the sources of data, either ds
, file
or some combination of the two.
The order you specify is the order in which priming is attempted from these sources. Priming is most efficient if the source server is on the same local network as the PingDirectoryProxy server.
For example, if you specify prime-index-source:file,ds
, priming is performed from the global-index
data file created from the previous run of the directory servers. If the entire global index has been primed previously from a startup or reloaded-index directory server’s source, the contents of the global index are written to disk periodically with the file,ds
configuration.
Configuring all indexes at startup
Steps
-
To prime all indexes at startup, run the
dsconfig
tool.Example:
The following example configures the entry-balancing request processor so that it primes the global index from the persisted file, if present, or from an external directory server’s source, if necessary.
$ bin/dsconfig set-request-processor-prop \ --processor-name dc_example_dc_com-eb-req-processor \ --set prime-all-indexes:true --set prime-index-source:file \ --set prime-index-source:ds
Configuring the global indexes manually
About this task
If you don’t want to configure priming during setup, you can configure the index priming manually.
To do this, create an external server, create a global attribute index, and change the entry-balancing request processor to load indexes from the external server.
Steps
-
To create an external server of the PingDirectoryProxy type to represent a peer of the PingDirectoryProxy server, use the
dsconfig
tool with thecreate-external-server
subcommand.Example:
$ bin/dsconfig create-external-server \ --server-name intra-proxy-host.example.com:3389 \ --type PingDirectoryProxy-server \ --set server-host-name:intra-proxy-host \ --set server-port:338 \ --set "bind-dn:cn=Directory Manager" \ --set "password:secret123"
-
Create a global attribute index on the
uid
attribute.Example:
$ bin/dsconfig create-global-attribute-index \ --processor-name dc_example+dc+com-eb-req-processor \ --index-name uid \
-
To load the indexes at startup from the peer PingDirectoryProxy server, change the entry-balancing request processor using
dsconfig set-request-processor-prop
.
Persisting the global index from a file
About this task
The PingDirectoryProxy server supports periodically persisting the global index to a file and priming the global index from the persisted file when the server is restarted.
You can configure an Entry Balancing Request Processor to periodically persist the global index to disk so that when the Entry Balancing Request Processor is reinitialized on startup it can prime the values from disk instead of putting load on the remote servers. Reading the index from disk eliminates the load on backend PingDirectory server instances if many PingDirectoryProxy server instances are starting at the same time.
You can configure an entry-balancing request processor to persist the global index to disk by including file
as one of the prime index sources with the prime-index-source
property. The persist-global-index-frequency
property controls the frequency at which the file is written.
The global index must be primed before it is persisted. It can be primed initially using a peer PingDirectoryProxy server or from a backend PingDirectory server.
When new global attribute indexes are added on a running PingDirectoryProxy, the global index can be primed with those attribute indexes by running the rebuild-index
tool. The rebuild-index
tool uses a remote server for priming the global index, even if file
is configured as a source.
On subsequent restarts of the PingDirectoryProxy server, the global index is primed from the persisted file instead of going over the network to a remote server, which allows it to be primed much faster than if it is using a remote priming source. During server startup, the global index priming works by using each configured prime-index-source
property in the specified order until it is fully primed to take advantage of what is available locally before contacting one or more remote servers.
Steps
-
To prime all indexes at startup from a file, run the
dsconfig
tool.Example:
dsconfig -n set-request-processor-prop \ --processor-name entry-balancing \ --set prime-index-source:file \ --set prime-index-source:ds \ --set persist-global-index-frequency:10s \ --set persist-global-index-directory:/servers/proxy-1/index-files \ --set prime-all-indexes:true