Comments (8)
具体是什么方面?现在就i时多核多线程。
from cinatra.
from cinatra.
这个问题需要研究,看看怎么进一步利用asio多核特性。
from cinatra.
嗯性能可以参考 nginx
from cinatra.
也可以参考之前写的 tinyco 思路,也是借鉴 nginx 的**。
from cinatra.
这个意义应该不大。io密集型应用单线程足够,cpu密集型需要在响应请求后手动创建任务或者创建线程。nginx的**核心在于,php等网页脚本都是单线程解析执行,速度慢,要是单线程就阻塞住了其他网页请求的响应,所以需要多线程。但cinatra因为用的是c艹,所以是偏向于io密集型,单线程足够占满几乎所有的IO。假如需要做大量的计算,可以尝试手动创建线程,然后把IO线程的资源放出来,给其他IO请求使用
from cinatra.
node.js就是IO密集型,IO线程处理就能在很大程度上比多线程/多进程的php的qps更高
from cinatra.
每个核心跑一个 asio::io_context?
看到最新代码有 https://github.com/qicosmos/cinatra/blob/master/include/cinatra/io_service_pool.hpp
from cinatra.
Related Issues (20)
- http响应数据解析有情况 HOT 19
- websocket服务端一些问题 HOT 14
- refactor cinatra server to support c++20 coroutine HOT 4
- 编译报错,‘_M_set_length’ is not a member of ‘std::string’ HOT 5
- 如何使用已有的io_context运行cinatra HOT 1
- 如何获取coro_http_client调接口 耗时 HOT 3
- Highly concurrent downloading of 2m js files will increase memory usage HOT 1
- websocket,1分钟没有消息交互,服务端会主动把链接掐断 HOT 2
- Windows visit Chinese filename not found
- 请问下,考虑支持unix套接字吗. HOT 10
- 是否可以让server对象的listen函数支持设置连接队列的长度? HOT 6
- bug: gcc resize_and_overwrite 導致髒數據的問題 HOT 21
- fatal error: 'asio/dispatch.hpp' file not found HOT 2
- https question HOT 18
- Failed to connect websocket with `Connection: upgrade` HOT 3
- [需求] 处理程序相关 HOT 12
- client URL 检测 的奇怪 bug HOT 7
- 上传二进制文件无法使用 HOT 2
- async_download 没有写入内容到文件 HOT 5
- 请问下,当链接断开时,如何获取到具体原因? HOT 3
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 cinatra.