lua-seri模快建议增加压缩特性,优化解码性能 #2146
JackLeeDev
started this conversation in
General
Replies: 4 comments 9 replies
-
|
我不希望改动这个核心模块增加复杂度和维护成本。 但如果你在使用 cluster 模块时,如果需要节省 cluster 间的带宽,建议外加上压缩。有两个方案可供选择:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
另外,我感觉就类似的应用场景,想修改 lua-seri 的话,有一个比较简单有效的方案:
这样只需要先额外同步一下每个服务的预编码表,注入到当前服务中。编码和解码都可以更快,因为查表的时间相对构造字符串的时间,无论是编码还是解码环节都可以大大加快。 |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
无限制增长的数据,为什么不设计分条存? |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
如果你要发往 db 节点的数据信息密度很低,我觉得应该考虑在本地一个服务先汇总,然后合并分批压缩,按带宽再传输到 db 节点。 只要做了本地的这个中转点,想怎么压缩加工都能很方便的做。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
项目玩家数据定期存档,当有大量玩家数据存档(背包物品、任务多的时候),DB节点会触发socket buffer相关警告,并且消息的解码性能会严重影响DB节点的性能。建议lua-seri支持下数据压缩,减少DB节点通讯流量,优化下解码性能。目前项目的解决方案是重写消息序列化模块,大消息编码大小-50%,解码时间-40%。参考:https://github.com/JackLeeDev/qseri
Beta Was this translation helpful? Give feedback.
All reactions