If you want millions of concurrent connections, then you won't be able to achieve that. The limit is usually in the thousands. If, on the other hand, you want millions of requests served per second, then you may just be able to get away with it, but only if your request processing is of the most trivial kind and the response is very short.
Generally, if you are doing this in Java, you should not use the standard blocking java.io
API because that engages two threads per every single connection: one for reading, one for writing. Instead use the Netty library, which allows asynchronous TCP communication, meaning that only a thread pool of modest size can handle a very large number of requests: the threads are never idle waiting for input to be received or for output to be sent. They get busy only processing the data.