Henry LONNG

Results 60 comments of Henry LONNG

这个和机器配置有关,可以自己根据自己的需求压测一下

只能单独加一个组件,两个用户都注册到这个组件,然后来通信,目前 nano 是支持两个不同 gate 的用户路由到同样的另一个服务的。

@zhaocy 可以把消息转发给自定义的携程处理,只需要对应的服务实现 Scheduler 接口就可以了。 参考 https://github.com/lonng/nano/blob/master/cluster/handler.go#L452

简单来说就是注册 service 的时候为这个 service 指定一个 scheduler name (https://github.com/lonng/nano/blob/master/component/options.go#L50),然后讲这个 scheduler 绑定要 session。 1. component.WithSchedulerName(xx) 2. session.Set("xx", scheduler) 然后对应服务的消息就会让这个 scheduler 调度,而不是全家调度。

session 是用来维护连接状态的,应该不不需直接传递给应用服务吧

@zhaocy Currently, Nano cannot support synchronize session data between nodes in the same cluster.

The gateway can be scaled horizontally.

Both nano and fasthttp relly on TCP. Do you want implement nano base on fasthttp? Sorry, I cannot grasp your point.

Please reference https://stackoverflow.com/questions/33351387/how-to-use-internal-packages

@kpfaulkner There is no go client example, sorry for that.