Quantcast
Channel: C# Based Open Source SNMP Library for .NET and Mono
Viewing all articles
Browse latest Browse all 576

Closed Feature: Response message received doesn't match with the request sent. [7247]

$
0
0
This issue was observed when we used SnmpMessageExcetnsion.BeginGetResponse method to send tens or hundreds of requests per second. To avoid the creation and destroy of socket instances for each request/response, we hold a socket instance in our module, and passed that socket instance in each time we call BeginGetResponse method. Then we found some responses didn't match with the original requests(the request ID in the response doesn't match with that of the request).

This issue only happens when one single socket instance is used in sending large number of request simultaneously.

**Analysis on this issue**
In the BeginGetResponse method, it starts receiving response once the request has been sent out. Then, it returns the next received response message as the RESPONSE for the request sent before. But in a high-stress scenario, there may be multiple outstanding requests, and the response message may be received in any order, so the next response message received may not be the response for the request just sent.

**Possible solution**
To solve this issue, a request-response matching mechanism is needed. It should keep track of all outstanding requests, and match the received response with corresponding outstanding request, and then complete the conversion by returning the correct response message.

Thanks

Viewing all articles
Browse latest Browse all 576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>