Server Configurations


EnOS provides a function for users to configure proxy servers which can be used by nodes such as the MQTT Sub and MQTT Pub nodes.


This section shows how to configure and manage a server configuration.

Creating Servers


  1. Log in to the EnOS Management Console, go to Device Data Integration > Server Configurations, and you will see the list of servers that have been configured.
  2. Click New Server.
  3. Fill in the information as per the below.
    • Name: The name for the server.
    • Type: The server type, currently only supporting MQTT Server.
    • Password: The password for the server.
    • Description: The description for the server.
  4. Click OK to finish creating the server, and it will appear in the list of servers with a system generated ID and an Offline status. To get the server information such as its username and URL, see Editing Server Configurations.

Starting and Stopping Servers


Note

Before starting the server, ensure that you have allocated the required resource for the server. For more information, see Allocating Resource.

  1. In Device Data Integration > Server Configurations, locate the sever you wish to start from the list and click the Start icon btn_start.
  2. The status of the server will change from Offline to Deploying. Once successfully deployed, it will change to Online.
  3. To stop the server, click the Stop icon btn_stop and the status will change back to Offline.


Allocating Resource

Note

Before allocating resource, ensure that you have applied for the Data Integration resources at the EnOS Management Console > Resource Management page. For more information about requesting resources, see Resource Management on EnOS.

  1. In Device Data Integration > Server Configurations, locate the sever you wish to allocate resource for and click the Allocate Resource icon btn_allocate.

    • Instance: Supports multiple instances. The minimum number of instances is 1, maximum number is 4.
    • Single Instance Resource: Represents the computing resources consumed by each instance in CU. It is recommended to allocate more resources for servers with multiple clients as that requires more resources for computing. The smallest unit needed to start the server is 1 CU, maximum unit is 8 CU. The total resource allocated (Instance × Single Instance Resource) cannot exceed the remaining resource.
    • Total Runtime Resource: The total amount of Data Integration resource applied for your OU.
    • Remaining Resource: The remaining resources you can use.


  2. Click OK to finish allocating the resource.

Instance Allocation Recommendation


Max number of connections to an MQTT server: 1,000. If you need more than 1,000 connections, it is recommended to use MQTT server clusters, max 4 servers, which will increase the max number of connections to 4,000.

Single Instance Resource Allocation Recommendation


To improve efficiency and reduce resource utilization, it is recommended to allocate the MQTT server resource and the MQTT-subscribed cloud flow runtime resource as per the below. For more information about how to allocate the cloud flow runtime resource, see Allocating Runtime Resource.

  • When Transactions Per Second (TPS) < 10, it is recommended to allocate 1 CU Single Instance Resource for MQTT server and 1 CU Single Instance Resource for the flow.
  • When 10 < Transactions Per Second (TPS) < 200, it is recommended to allocate 1 CU Single Instance Resource for MQTT server and 2 CU Single Instance Resource for the flow.
  • Transactions Per Second (TPS) > 200 is not suggested.

TPS refers to the number of messages processed per second, which is used to measure the message processing speed. The faster the flow subscribing to an MQTT topic runs, the larger the MQTT server TPS. If a flow takes 10ms to process 1 message, the TPS will be 100, as 100 messages will require 1s. You can view the runtime for each message in the cloud flow log. For more information, see Viewing Logs.

Monitoring Runtime Status


  1. In Device Data Integration > Server Configurations, locate the sever you wish to view its runtime status and click the Monitor Status icon btn_monitor.
  2. A pop-up window will show a graph of the server’s CPU/memory usage, dequeued/enqueued messages as well as subscription topics.
    • CPU/Memory: The server’s CPU and memory usage per minute for the past hour as well as the number of the server’s connections for the past hour.
    • Dequeued/Enqueued Messages: The number of dequeued and enqueued messages per 5 minutes for the past 24 hours.
    • Subscription Topics: Real-time topic subscription information, as per the below. The information will be automatically cleared approximately 10 minutes after the client goes offline.
      • Topic: The topic of the message is displayed after the MQTT QoS (Quality of Service) level, for example: EXACTLY_ONCE:topicName.
      • ID: Client ID.
      • Status: The status whether the message is valid or not.
      • Pending Distribution: The number of messages to be distributed.
      • Distributed: The number of distributed messages.


To monitor the runtime status of a flow that used an MQTT server, you can view its flow log. For more information, see Flow Logs.

Deleting Servers


  1. In Device Data Integration > Server Configurations, locate the server you wish to delete from the list and click the Delete icon btn_delete.
  2. Deleted servers cannot be recovered. To delete the server, click the Delete button in the pop-up window.