Take for instance a situation where there are reported timeouts on connections to servers - there could be several culprits here.
- server taking too long to process requests ; resulting in non-acceptance of connections
- name lookup failure [if client is using names, not ip]
- network layer drops
Basic principles of logging:
- log key entry and exit functions in your application
- seed in time information where it'd be useful - for instance if a connection is critical to the performance of the next step; have a try-catch block that captures return codes.
- always have a timeout on a remote call - i.e. know what you need and how fast [do not rely on the server's sensitivity always] - and its a great piece of feedback to the server
- network flows are important and put that into place ** this area is new to me, more on this later.
- log DEBUG/INFO messages on production systems - it eats into precious IO resources
No comments:
Post a Comment