Solution
HTTP, like any network-based communication protocol, is inherently indeterministic. While response times and efficiency can be optimized by following best practices, complete precision is unattainable, and some level of variability will always be present.
Here are some suggestions to improve response times from the client-side:
- Opening and closing HTTP handles generally improves response times up to 2ms.
- Initialize the HTTP Library on the VI before making the actual request.
- Consider creating custom TCP/IP commands outside of the HTTP Library. These commands might offer increased performance and faster response times due to being a lighter-weight protocol compared to standard VIs. (Advanced)
- Use parallel HTTP requests by enabling reentrancy in the VI. For more details, see: Sending Multiple HTTP Requests to the Same LabVIEW Web VI and Processing Them in Parallel - NI.
- Minimize unnecessary load and reduce the impact of other connected devices on the network.
To improve response times for a LabVIEW Web Service:
- Use a more powerful host with better hardware specifications to enhance request and response handling speed.
- For example, when hosting a Web Service on an sbRIO-9608, a device on the local network sending basic GET HTTP request typically waits about 14ms to receive the response back. In contrast, hosting the same service on an sbRIO-9609—featuring double the CPU cores and faster clock speed, among other enhancements—can reduce the average request response time to just 7ms.
- Pay attention to overall network speeds and load.