Creating a Distribution Function156 Red Hat Directory Server Plug-in Programmer’s Guide • May 2005Because the number of users is too large, you decide to distribute the entriesaccording to the first letter of each user’s last name, assigning each letter to aseparate database. To do this, you need to create your own distribution function.Your function determines how each operation received by the ou=users suffix isrouted to the database containing the information for a particular user.Once you have distributed entries, you cannot redistribute them. The followingrestrictions apply:• You cannot change your distribution function once you have deployed entrydistribution.• You cannot use the ldapmodrdn operation to rename entries if themodification would cause them to be distributed into a different database.• You cannot use the ldapmodify operation to change entries if that wouldcause them to be distributed into a different database.For example, if you distribute entries according to their telephone number,you cannot change the telephone number attribute of an entry withoutbreaking entry distribution.• Once you have deployed entry distribution you cannot add more databases.Creating a Distribution FunctionUsing the distribution function, you can set a suffix to have any number ofdatabase pointers. This allows you to distribute requests made to a suffix over anumber of databases.For example, the entry for the dc=example,dc=com suffix appears as follows:dn: cn="dc=example,dc=com", cn=mapping tree, cn=configobjectclass: topobjectclass: extensibleObjectnsslapd-backend: example.com database A-Mnsslapd-backend: example.com database N-ZWhen the suffix receives a request from a client, it uses the distribution functionto determine which database services the operation. The plug-in consists of afunction and a library. This function and library are part of the entry for thedc=example,dc=com suffix and appear as follows:nsslapd-distribution-plugin: /path/to/a/shared/librarynsslapd-distribution-funct: distribution-function-name