I'm using sysctl.conf settings from [1] and [2], but still I only able to open ~520K connections on largest cluster compute EC2 instance with CentOS. The same number was reported in this older thread [3].
[1] http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1/
[2] http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-3/
[3] Linux Kernel Tuning for C500k
http://news.ycombinator.com/item?id=1740823