Varnish allocates one thread per connection. Even if it supports websockets, it's not going to scale well across tens of thousands of simultaneous persistent connections. The context switch and memory overhead will be considerable.
For now, Java-based servers (using netty) and node.js may be a better idea.