在 go 服务中基于每个用户使用 Redis pubsub 的内存高效方式?

问题描述 投票:0回答:0

我们使用 GraphQL 订阅将数据推送到客户端。在用 golang 编写的 GraphQl 服务器上,我们为每个用户订阅连接到一个 pubsub 频道(每个用户的频道都是唯一的)。在测试时,我们注意到随着每个新用户订阅,go 服务内存消耗开始快速增长。

关于我们如何减少此实现的内存密集度的任何建议?

go redis graphql publish-subscribe go-redis
© www.soinside.com 2019 - 2024. All rights reserved.