Skip to main content
Documentation & User Guides | Fotoware

Configuring the Fotoware system to use a MongoDB Replica set

 

MongoDB replica sets can be configured to maintain the same data sets on two or more mongod processes for fault-tolerance / high-availability schemes.

The information in this article explains how to configure FotoWeb and Index Manager to use more than one MongoDB node. If you do not intend to configure MongoDB for high availability by setting up one or more individual MongoDB servers, the content of this article will be largely irrelevant but may prove useful if you later choose to introduce a redundancy/high availability scheme for the data stored in MongoDB.

 

Note: This article does not explain the details of setting up the MongoDB replica set itself. It merely guides you in setting up the Fotoware system to connect to the MongoDB replica set. More information on MongoDB replica sets can be found on the MongoDB documentation website (external site, opens in new tab).

Configuring Index Manager and FotoWeb to use a MongoDB Replica set

Index Manager setup

To configure Index Manager to connect to a MongoDB replica set, access the Index Manager configuration in the Operations Center and then navigate to the Service Options tab, then click on the Indexing tab below. There you find the FotoWeb server connection settings as shown in the screenshot:

Configuring Index Manager to push metadata to a mongodb replica set

Enable the Push metadata to FotoWeb server checkbox and choose Connect to a MongoDB Replica set using the radio button.

Enter the replica set name that you defined in MongoDB and add the hosts that are part of the replica set in the fields below.

Remember to click Save in the lower right corner to update the configuration.

​FotoWeb setup

FotoWeb uses MongoDB to store metadata about the assets in the Fotoware system. By default it uses a built-in MongoDB instance running on the same instance as the FotoWeb server. However, FotoWeb can also be configured to connect to a MongoDB replica set, which offers redundancy and high availability.

When using a MongoDB replica set you need to define the replica set name and the MongoDB hosts in the FotoWeb configuration. To do so, open the FotoWeb settings app.

Go to Settings > Database.

MongoDB replica set configuration in FotoWeb

By default, FotoWeb is set up to connect to the MongoDB instance that came with the installer and runs on the local host. This is illustrated in the screenshot above. To change this to a replica set, select Connect to a MongoDB replica set and enter the replica set name. Then enter the MongoDB hosts, using the Add host button to create additional entries.

NoteWhen FotoWeb runs using its own bundled MongoDB instance, the MongoDB server MUST be set to localhost, not the server's actual hostname. Otherwise, FotoWeb will assume that it has been configured to use an external MongoDB instance and is then no longer responsible for starting and stopping the MongoDB instance itself. For more information, see here.