Node-RED load testing
Node-RED load testing on the cloud environment provides many features and tools to take your application from development to deployment. Testing is a very important part of the development workflow when building quality applications and AWS provides many services for testing – from unit testing to performance and scalability testing.
Node-red testing on Edge gateway devices
Our Industrial IOT applications are built on Edge gateway devices – software as a service (SAAS) model, many customers would be using the same infrastructure. With each customer having 1000-2000 sensor devices for asset tracking, equipment monitoring, we were thinking of thousands of sensors communicating in realtime to our Node-RED application We had to do a load testing to understand the limitations of our application and the number of environmental monitoring sensors connected in the hospital
Load testing is the process of putting demand on a software system or computing device and measuring its response. Load testing is performed to determine a system’s behavior under both normal and anticipated peak load conditions. It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation.
Node-RED testing on cloud
We decided to use service form LoadImpact – Load Impact is performance testing software used by DevOps teams to understand the real capacity limits of their websites, apps, and APIs. Because of the ability to access via API, it can be included as part of automated testing in the delivery pipeline.
Node-RED load testing – user scenario
‘User scenario’ consists of the activities done by a user(or a connection) in a session – login, click this link on the homepage, call this URL, download file, etc. Load impact comes with a chrome extension that allows you to record your actions in the browser. If you want more control, you can write the scripts using ‘Lua’. Virtual users are like systems that initiate a connection with the server under testing – each Virtual user performs a User scenario.
Load impact allows us to configure the location from which Virtual users must communicate to the server under testing – Singapore, USA, Europe. For each test, Load impact allows us to specify the number of virtual users, the geographic locations from which they will be accessing, user scenario they will be testing and the total duration of the test.
We wanted to start testing with low load and later increase to higher loads. We created a new DB so that load test data need not be confused with actual data sent from sensors. We also created dummy sensor documents in DB that will be used to get information about the sensors connecting to our IOT Industrial asset tracking application. Node-RED
Node-RED load testing – adding intelligent sensors
We started with 50 sensors and later tried up to 1000 IOT sensor devices. We noted the response time and failed requests. We also checked if any packets were dropped in processing. We recorded a worst-case of 3.5s maximum response time but other that, no packets were being dropped and we were falling within the API call limits for using storage services. Because of this testing, we identified a problem that may occur under a rare occurrence where we might exceed API call limits and incur unexpected costs on the AWS cloud and was able to fix it with caching.