Kafka网络通信模型
作者:互联网
先说NIO reactor
原始的方式 全部一个线程完成
- networkclient
- acceptor
- dispathch
- hander
- networkclient
增加一个处理器负责处理业务 Processor 线程池专门处理 handler
- networkclient
- acceptor
- (多线程)Processor pool 【新增】
- dispathch
- hander
- networkclient
主从Reactor多线程模式 增加一个 认证线程
- networkclient
- acceptorpool(多线程) 【新增】
- acceptor dispathch
- acceptor
- (多线程)Processor pool
- Processor dispathch
- hander
- networkclient
kafaka模型
- networkclient
- acceptor
- ProcessorPool
- ProcessorPool dispathch to requestQueuePool
- requesthanderPool from requestQueuePool
- requesthanderPool dispathch to apis
- apis to requestQueuePool
- requestQueuePool to ProcessorPool
- ProcessorPool to networkclient
requesthanderPool(多线程)from request queue] --->
标签:网络通信,requestQueuePool,模型,ProcessorPool,Kafka,dispathch,networkclient,多线程,accepto 来源: https://www.cnblogs.com/guanchaoguo/p/16498221.html