-
Notifications
You must be signed in to change notification settings - Fork 4
RMB-Peer: Enable Observability & Better throughput and resilience under load #1413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RMB-Peer: Enable Observability & Better throughput and resilience under load #1413
Conversation
@@ -594,7 +594,7 @@ func (d *Peer) makeEnvelope(id string, dest uint32, session *string, cmd *string | |||
} | |||
} | |||
|
|||
env.Federation = destTwin.Relay | |||
env.Federation = destTwin.Relay // this field is deprecated and no longer used by the relay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so why it is not removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope of PR; comment is enough for now
|
||
// Reconnections computes the number of reconnection events from a total connection count. | ||
// It returns max(total-1, 0). | ||
func Reconnections(total int64) int64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is not it repeated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used in the InnerConnection loop()'s deferred func
Superseded by: #1437 Reason: We consolidated multiple related PRs to resolve conflicts, preserve consistent behavior, and land the full feature set together (tags, TTL safety, cooldown failover, lifecycle/observability, URL validation, tests/docs). Action: Closing this PR as superseded. Thanks for the work and discussion here. |
Summary
Enhances the
rmb-sdk-go/peer
package with resilience, observability, and handler usage best practices.What's Changed
Documentation Enhancements
Router.Serve
) vs. client (RpcClient.Call
) patterns.InnerConnection
ImprovementsconnectionsTotal
andobserver
fields.writer
,reader
,outputCh
).Observability Layer
ConnObserver
interface.noopObserver
(silent),logObserver
(with sampled logging).Connection Statistics (
ConnStats
)Summary()
andExit()
for periodic and exit reports.Minor Improvements
Federation
envelope field.Why This Matters
Impact & Notes
Related issues: