-
Notifications
You must be signed in to change notification settings - Fork 17
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
gate是否会成为热点? #1
Comments
我没有实际压测过,如果真的有性能问题,可以参考 |
嗯嗯,谢谢~ |
不好意思,再请问一下。在设计上,通过loginserver(https)去验证账号密码,得到一个token。然后通过url/?token=xx的方式来建立ws连接。请问这个token在什么步骤验证是合理的?我目前是握手的时候检查,但是握手的时候好像连接已经建立了。理想的状态是当有新的连接进来时,验证token是否合法,合法才建立连接,不合法直接丢弃。请问在什么位置去验证你有经验或者建议吗? |
建立连接后第一条协议验证token即可,加个定时器超时没发第一个验证协议就踢掉,没验证就发其他协议也踢掉,这样就跟 TCP 差不多。不过你的 token 在 url 里面,可以 |
请问你会考虑写一个master/slave方式的gate服务吗?我试着搞了一天,逻辑分离得依然不清楚。有点难。 |
最近没空搞,等有空再考虑吧,你能写出来就更好了。 😄 |
我试了两天,写了几版好像不太行=。= |
@mikewu86 随意写了下,你拿去改改看吧,应该能满足你的需求。 |
超赞~~ |
感谢~~ |
如题,我看到gate既要负责转发来自客户端的消息,还要转发去客户端的消息。会不会成为热点服务,顶不住啊?
The text was updated successfully, but these errors were encountered: