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.