What you propose sounds like a lot of extra work at the onset. Consider starting with a simple trial version of your program would get you up and running with less effort. This way you could see whether CPU or memory is the limiting factor, and could work to optimize just that factor (and not waste time on the wrong factor). Or perhaps the trial version will achieve your goals without having to do any optimization. J
John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Nick Rio Sent: 2017 March 05, Sun 23:28 To: golang-nuts Subject: [go-nuts] Re: How can I implement a TCP server using a model which similar to epoll (or kqueue, IOCP) rather than just using goroutine for each client? Thank you for reply. No guys, it's me using too many memories, not Goroutine. However, I believe if I can make those code in epoll-style, I can then build a task queue to handle those connections one by one in a queue when they back to active. For example, start one *accepter* goroutine + few *worker* goroutines. Then I could do buffer sharing within each *worker* instead of each connections. Which well reduce a huge bunch of memory requirement + also reduce numbers of goroutine. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.