You should not think of a single machine with millions of users. It would be so called 'vertical scaling' which is pricey and also dangerous - if the machine fails, your entire application would become not available. And to add to that, you would most likely hit a well known 10KC problem - http://en.wikipedia.org/wiki/C10k_problem.
Instead you should think of horizontal scaling and lots of caches (like Varnish etc.)
Just to give you a few links: http://en.wikipedia.org/wiki/Scalability, Difference between scaling horizontally and vertically for databases.
It all depends on the type of application you have to write, types of requests, number of requests per second, how many of such requests would read/write to database, how stall data can be returned to the user and MANY more.