0

I am implementing a tcp server based on epoll and JAVA virtual threads, I created a platform thread for infinitely epoll_wait() for incoming messages or connections, and for each connection established, a virtual thread with a BlockingQueue is created. So there is only one thread that handles all the accept() recv() send(), I assume that is fast completed when everything is nonblocking. However when I read about netty and other projects, they tend to use several threads for both epoll_wait() and message handling, I am confused about my threading model whether it's performant, will the single thread running epoll_wait() and all the IO operations be the bottlenect of my program?

I run several benchmark on my tcp server, and the result seems not so well comparing to netty, so I am worried about my epoll mechanism over coroutine if it's correct or not.

benrush
  • 43
  • 4

0 Answers0