/nio_reactor

基于nio reactor模式的轻量级server. 接受请求分发请求和netty类似,展示了netty接受和分发请求的过程。每9秒可以处理10万请求

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

NIO Reactor

About

  • A Nio server, use multi reactor pattern like netty.
  • Could process 100,000 request in 9 seconds.

Design

  • There is a acceptor to listen connection from client
  • when acceptor get a connection, it will dispatch to processors
  • There are a lot of processors to process a connection. And each processor corresponding to a thread.
  • Every socket channel from acceptor will be registered on the selector of processor.