mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 01:44:14 +00:00
56 lines
2.0 KiB
Markdown
56 lines
2.0 KiB
Markdown
|
## Docker镜像制作
|
|||
|
把`Dockerfile`放到一个目录,同时把编译好的`bdagent-lite.zip`放到同一目录,并解压、制作镜像:
|
|||
|
```
|
|||
|
c07e0791-4e37-422b-86e4-31307cd803f1
|
|||
|
cd ./build/output/
|
|||
|
cp ../../Dockerfile ./
|
|||
|
docker build -t bdwaas/bdcontract:tag
|
|||
|
docker push bdwaas/bdcontract:tag
|
|||
|
docker push
|
|||
|
```
|
|||
|
|
|||
|
|
|||
|
## 笔记待梳理(监听端口与EventGroup)
|
|||
|
|
|||
|
### 服务端
|
|||
|
|
|||
|
1) port: http & websocket server port
|
|||
|
2) port+1: tcp server port
|
|||
|
httpServer与tcpServer 共用同一组EventLoopGroup, boss group CMHttpServer.workergroup
|
|||
|
workerGroup对应的异步线程池:ContractManagerFrameHandler.executorService
|
|||
|
|
|||
|
3) port+2: doip server port
|
|||
|
ContractRepositoryMain是自己有一组workergroup
|
|||
|
|
|||
|
4) port+3: prometheus server port
|
|||
|
prometheus自己管理newFixedThreadPool(5)
|
|||
|
|
|||
|
5) ContractManager本地监听端口:1615+X
|
|||
|
ServiceServer里面,独立的workerGroup/bossGroup
|
|||
|
ServiceServer.executor
|
|||
|
|
|||
|
|
|||
|
### 客户端
|
|||
|
|
|||
|
1) TCP连接NodeCenter
|
|||
|
Bootstrap都在CMActions里面实例化,独立声明的EventLoopGroup group = new NioEventLoopGroup()。
|
|||
|
ContractManagerFrameHandler.executorService
|
|||
|
|
|||
|
2) TCP连接其他Master
|
|||
|
每个连接一个Bootstrap
|
|||
|
b.group(CMHttpServer.workerGroup)直接是与http/tcp/Server的worker Group。
|
|||
|
MasterClientFrameHandler.executorService
|
|||
|
|
|||
|
|
|||
|
是网络忙还是计算忙?
|
|||
|
是只在发端控制?还是收发一起控制?
|
|||
|
对于单个节点的视角
|
|||
|
TCPClient发前流量控制检查,->TCPServer收到后强保障
|
|||
|
* 当前版本:仅在Http端控制队列长度
|
|||
|
* 0331周计划版本:在CMHttpServer.workerGroup控制?
|
|||
|
* 需要理清异步线程池。
|
|||
|
|
|||
|
## 线程池
|
|||
|
|
|||
|
ContractManager.executor是一个可扩容线程池,front-agent中所有线程执行需求都可以合并进去。
|
|||
|
合并时,建议按照自己的线程执行需求对核心线程数(ContractManager.executor构造函数的第一个参数)进行增加,并适量提高最大线程数(第二个参数)。
|