Skip to content
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

spring的ws服务 跟netty发布的ws服务性能差别大嘛 #13

Open
kukudereagan opened this issue Nov 23, 2021 · 6 comments
Open

spring的ws服务 跟netty发布的ws服务性能差别大嘛 #13

kukudereagan opened this issue Nov 23, 2021 · 6 comments
Labels
question Further information is requested

Comments

@kukudereagan
Copy link

spring的ws服务 跟netty发布的ws服务性能差别大嘛?有做过测试吗

@la3rence
Copy link
Owner

/label question

正常业务的性能比较的话 spring websocket 和 netty 没多大差别。一方面看客户端数量,我当时这个项目 500 多个客户端一个实例留够堆内存其实完全够了;netty 自己写会很麻烦,如果考虑做集群,单纯看框架本身性能意义不大。怼上几个 Pod / Node / Container 就行。

@k8s-ci-bot k8s-ci-bot added the question Further information is requested label Nov 23, 2021
@kukudereagan
Copy link
Author

谢谢,今天尝试看不出性能差别。但今天发现gateway跟websocket-server连不上,
用ws://gateway-server:8000/websocket/connect/12 连不上
这是少了什么配置吗

@la3rence
Copy link
Owner

Spring cloud gateway 是 L7 的 load balancer;访问 ws:// 需要 websocket 客户端。
当时这个项目都在容器内运行,你看一下 compose network。

@kukudereagan
Copy link
Author

Spring cloud gateway 是 L7 的 load balancer;访问 ws:// 需要 websocket 客户端。 当时这个项目都在容器内运行,你看一下 compose network。

加了客户端的服务名,还是不行噢

- id: a-biz
          uri: lb://a-biz
          predicates:
            - Path=/a-biz/**
          filters:
            - StripPrefix=1

配置的加的普通项目也是访问不到的,我自己的gateway 都是好用的

@kukudereagan
Copy link
Author

没有用docker跑,直接本地跑的项目。应该跟docker 配置没关系,docker配置我都注释了

@kukudereagan
Copy link
Author

image
注册的服务也是好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants