-
Notifications
You must be signed in to change notification settings - Fork 494
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
MQTT performance optimization #304
Conversation
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
Codecov Report
@@ Coverage Diff @@
## main #304 +/- ##
==========================================
+ Coverage 80.22% 80.47% +0.25%
==========================================
Files 53 53
Lines 5897 5973 +76
==========================================
+ Hits 4731 4807 +76
- Misses 907 908 +1
+ Partials 259 258 -1
Continue to review full report at Codecov.
|
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
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.
[TASK:easegress-pr-test SUCCESS]megaease/easegress Pull Request 304 Deploy Test Success
This pr contains following optimizations and updates for MQTT proxy.
defer
writePacket
lock since golang write toConn
already contain locks.writePacket
has no lock, then cancel create goroutine insession.publish
(no risk of dead lock), use buffered channel instead.github.com/hashicorp/golang-lru
package in topic cache. Keep both speed and memory security.splitTopic
function in topic.go)cleanSession
flag is settopicMgr
when client is closed to improve performance.Thanks a lot for advice from @faceair.