Comments (5)
@andylei18
以beidou simple example为例, 根据我上面说的三个点(采用react16, production模式启动,去掉worker=1
, 我本机起了7个worker), RT从21ms降低到了2.5ms左右(客户端采集到的RT,服务端RT大约还要减去1ms), 并发量从QPS40多升到了800以上(未压到极限)
至于你说的egg-view存在性能问题,这个我会再跟进的
from beidou.
我是mac顶配 本机测试
from beidou.
以下四个方面因素影响非常大
- 模板中默认版本是react15, 依赖升级到react16,性能会有非常大的提升,大约会在10倍左右
- 本地开发模式,默认NODE_ENV=local, 以 production模式启动,大约会提升 2-3倍(另外在local环境下,所有请求都会经过webpack, 这也会有一倍左右的性能影响)
- 本地开发,默认开启进程数是1个,去掉
worker=1
, 会起CPU核数个进程,QPS会有大幅提升的, 参考work number code - node版本,node 8相比node 6会有30%左右的提升
可以试试这四个方面, 关于第一点,我们在升级默认的react版本了。 另外超时应该是单个进程处理不了这么大并发量,很多请求超时了
from beidou.
@weichunpeng
1.react 版本这个我理解;
2.NODE_ENV 这个我觉得 约定的太死了,光我知道很多公司线上NODE_ENV不是production,是不是这块的耦合性太高了;
3. worker 数我理解跟部署服务器的cpu核数相关;
4.我就是v8.9.3
5.Egg 本身的egg-view这个包就有性能问题;这个我测试过
from beidou.
@weichunpeng 收到 多交流。技术无国界
from beidou.
Related Issues (20)
- 路由错误最小复现
- 招贤纳士
- v2.2.1版本修改factory.getPlugin返回值无效 HOT 1
- with-dva 项目运行警告
- with-dva 在官方demo 修改成路由的模式
- 如何使用app.injectCsrf和app.injectNonce HOT 1
- Build framework on the top of Beidou HOT 2
- npm包版本问题
- 关于设置alias,出现Debug下无法加载资源
- ReactDOM.hydrate会覆盖服务端渲染结果,如果注释,相关事件就无效。如何处理? HOT 2
- facebook分享报206 HOT 4
- client获取controller数据 HOT 2
- 请问现在beidou还更新吗,有更好的解决方案了吗? HOT 2
- NODE_LOG_DIR not configured HOT 1
- typescript模板打包报错 HOT 3
- with-react-loadable 無法載入 HOT 1
- webpack 服务是否可以支持https
- 继续升级,作者继续啊
- 从零开始搭建应用 无法启动 HOT 3
- 主进程会偶尔收到SIGTERM信号导致程序exit HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beidou.