Comments (7)
The changes can be found here:
wdreeveii/gosnmp-sonia@9b60403
Unfortunately I can not submit a proper pull request because of the way I had to 'fork' this repository. :(
from gosnmp.
I understand your use case. I do however disagree with this change. The timeout should be for the blocking API call as a whole, not what happens at the implementation layer.
There are two setting:
-
Timeout - this blocking request will take no longer than X.
-
Retries - SNMP sits on UDP and we must implement our own retry logic to cover packet loss. IMHO this is really not a "user setting" - Just like we really never change our TCP stack's default retransmission settings.
The statement:
The next problem is that the timeout is divided among retry attempts. If you have a
large amount of retries, and a relatively small timeout, your effective request timeout
is extremely small.
is not quote correct. The current code stores the request IDs for all requests that have been set. If the first one (or any retry request) was to arrive in any order, the response would be used and returned. At the API level, the effective request timeout will be equal to the timeout as set.
The design is analogous to that used in net-snmp and snmp4j.
The point you raise about library usability and default timeouts is a good one. I agree that the default timeout should be increased.
In walkexample.go
you'll see the following code, just for this reason!
gosnmp.Default.Timeout = time.Duration(10 * time.Second) // Timeout better suited to walkin
The current default is only 2 seconds. snmp4j for example has a default of 60 seconds. I'd like to put a stake in the ground and say 30s would be a better default. @soniah and @virtuallynathan would you agree?
from gosnmp.
Thanks @codedance . I had surgery last Friday, so I'm a bit "out of sorts" :-/
from gosnmp.
OK, I understand how this is supposed to work now. I will need to change the way I am thinking about this because with the timeouts I was using, there is unnecessary load on the network.
The timeout supplied to this library should be [maximum allowable network latency] * [retries].
from gosnmp.
@wdreeveii Do you agree that the default timeouts should be increased? What are your thoughts on what a logic timeout would be for your use-case?
from gosnmp.
I think 60s is a good timeout. That is what I am currently using for
bandwidth constrained high latency satellite links. We allow 15 second
timeout per transmission with 4 retries.
On Wed, Sep 3, 2014 at 8:23 PM, Chris Dance [email protected]
wrote:
@wdreeveii https://github.com/wdreeveii Do you agree that the default
timeouts should be increased? What are your thoughts on what a logic
timeout would be for your use-case?—
Reply to this email directly or view it on GitHub
#31 (comment).
Whitham D. Reeve II
907-764-5263
from gosnmp.
Thanks Chris @codedance, I'll have a think later. Just been catching up on some other pull requests...
from gosnmp.
Related Issues (20)
- multiple device concurrent polling fails unless you create your own snmp object HOT 2
- Question: Use on Windows HOT 1
- VULNERABILITY [CWE-347] CVE-2020-9283] golang.org/x/crypto Improper Signature Verification HOT 1
- Sometimes a previous privacy passphrase is reused instead of the specified one
- usmStatsUnknownUserNames as terminating error? HOT 3
- Chinese coding is garbled HOT 2
- How to configure read/write community? HOT 1
- marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Value out of range HOT 2
- Should cancelling a context interrupt an ongoing operation?
- out of bounds error when parsing AuthNoPriv packet HOT 4
- msgMaxSize to be supported in SNMP v3 bulkwalk requests
- V3 feat needed: Load keys manually if the passphrases are not allowed be saved locally HOT 1
- Connect function in gosnmp always returns nil even if the credentials are not valid HOT 1
- Panic in unmarshalV3Header
- Compatibility with GoSNMPServer HOT 7
- `net-snmp` based validation testing HOT 5
- Request ID size too large
- Not handling `0` values correctly for `OpaqueDouble` or `OpaqueFloat`
- Using SnmpDecodePacket for Encrypted/Authenticated Packets in GoSNMP HOT 5
- Retry netConnect() on resolution failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gosnmp.