When a client connects to a server using its hostname, it must first go through the network in order to obtain the IP address associated with that hostname, which adds overhead to the connection.
A hosts file is a configuration file which allows you to forcefully associate certain hostnames with specific IP addresses. This can allow you to set up a client machine to directly connect to the IP address of your Harmony database server without having to query the network for its address first, which may increase network performance. However, this should only be done if your database server has a static IP address which you do not intend to change. If the IP address of your server changes, the information in the host file will no longer be accurate and you will be unable to connect to the server unless you update or remove the configuration in the hosts file.
In a terminal, open the hosts file for editing:
sudo vi /etc/hosts
- At the bottom of the file, add a new line.
Type in the permanent IP address of the Harmony database server followed by its hostname, separated by a space. For example, if your database server is named harmonyserver and its IP address is 10.127.1.1, you would type in the following:
- If your Harmony database server uses other machines for scene data storage, repeat for each machine used for the server so as to associate each machine's hostname to their permanent IP address.
- Save and quit.