Skip to content

Database Configuration and Clustering

Mideye Server 5 can run in a clustered configuration with multiple servers sharing a common database. Changes made on any server propagate in real-time to all other servers.


To create a Mideye Server cluster, two or more Mideye Servers can be configured to use the same database. Changes made in any Mideye Server will propagate in real-time to the other servers.

Only one of the servers in a cluster should be configured to execute scheduled database cleanup.

In case two or more Mideye Servers are configured to share the same database, only one of them should be configured to execute scheduled database cleanup (cluster leader).

In the server(s) not intended to be cluster learders, open as an administrator:

  • Linux: /opt/mideyeserver/config/application-prod.yml
  • Windows: C:\Program Files (x86)\Mideye Server 5\config\application-prod.yml

Navigate to the application section and add (or modify)

Terminal window
cluster-leader: false

See example below:

application:
switch-host: primary.mideye.com
switch-backup-host: secondary.mideye.com
switch-port: XXXXX
log-path: /opt/mideyeserver/log
# In case the Mideye server is running in a cluster with
# multiple instances against a clustered database
# set this to false in the minion instances to prevent
# potential deadlocks for scheduled cleanup jobs.
# The default value is true as this is the commonly used setup.
cluster-leader: false

In same cases the databases must be changed. Follow the instructions below:

Open application-prod.yml as an administrator:

  • Linux: opt/mideyeserver/config/application-prod.yml
  • Windows: C:\Program Files (x86)\Mideye Server 5\config\application-prod.yml

Navigate to database section (example below) and change the output to fit the new database.

Terminal window
driver: net.sourceforge.jtds.jdbc.Driver
url: jdbc:jtds:sqlserver://localhost:1433/mideye;domain=mideye.com;prepareSQL=2;useNTLMv2=true
username: "username"
password: "password"

Save the file and restart the Mideye Service.