Closed neatcode closed 7 years ago
I don't really know. The only way to check would be to test. If you can, try to open as many connections as possible with a fake network:
cc, sc := net.Pipe()
go sc.Write("* OK IMAP4rev1 Service Ready\r\n")
c, err := client.New(cc)
The client is just a wrapper around net.Conn
. It starts a few goroutines and consumes a little more memory than just a net.Conn
.
From other sources my guess it's about 5,000 simultaneous connections tops, which wouldn't be adequate for my desired application. Thank you for your answer.
Ie. this is a limitation of the Go language.
See also https://groups.google.com/forum/m/#!topic/golang-nuts/coc6bAl2kPM
Go should be able to handle more connections than Nodejs, but less than C.
FYI WhatsApp gets 2 million concurrent connections per server using Erlang. I think Erlang/Elixir is my solution. Any thoughts on how they compare to Go?
On a single, say $2500 dedicated server (average high end server), how many simultaneous connected IMAP email accounts do you think this client could handle?
Ie. how scalable is this client? assuming everything else is dummy code but the dummy code performs actions on each user account every 10 minutes or so like LIST or FETCH. assume db interaction is "free" in terms of performance for the purposes of this question.
just looking for a ball-park.