perf: consider allowing upstream connections to be shared by workers
#8,702 创建于 2019年10月21日
仓库指标
- Star
- (27,997 star)
- PR 合并指标
- (平均合并 8天) (30 天内合并 378 个 PR)
描述
The full silo model works out well in many cases, but in some cases (especially low memory) it may be better to allow a connection pool to be shared across the workers. This would cut down on the number of connections used, have greater connection pool hit rate, etc. at the expense of increased synchronization when the workers need to access the connection pool.
I think this could be implemented somewhat cleanly by allowing for a connection pool implementation that is shared across workers and uses its own processing thread.
This has already come up in discussion with @HenryYYang WRT to redis and I think @antoniovicente had also brought this up.
I'm opening this issue up for discussion as well as potentially a full design proposal if there is interest.