Start the Simulation¶
The Demonstrator use cases the seamless connection between a production equipment and an InfluxDb, connection facilitated by the SMARTUNIFIER. Two Instances are configured with a load balancer to provide the connection in high availability mode.
To run the simulation, two steps are required:
Generate the input data - random values.
Test the High Availability - by stopping one of the Instances.
Generate the Input Data¶
To simulate the data provided by a production equipment, the input data is generated by the send_data script, located in the scripts folder (install_location/SMARTUNIFIER-HighAvailability/scripts).
Run the script to generate random values for two parameters: pressure and temperature.

Note
For Linux, to generate the input data run the below command:
bash send_data.sh
The Rest Server picks up the new generated values and sends a post that is stored in the Influx database, using the SMARTUNIFIER. The overall process can be viewed on the Grafana dashboard.

Test the High Availability¶
The SMARTUNIFIER uses two Instances configured with a load balancer (Nginx). This means that if one of the two Instances is stopped, the load is handled by the other working Instance.
Stop one of the two Instances.

When one Instance is stopped, the communication fails over to the other running Instance and all the data is sent to the receiver, as seen below.

The script stops to generate values when it reaches the cycle limit, configured at 500.

