The advice at How do you off load work from the database? should give you a lot of material to think about.
Beyond that, pay attention to any standard platform specific optimizations. For instance for mod_perl applications you invariably want to have a reverse proxy in front of your website that serves static images, and which causes mod_perl processes to not waste time talking to slow clients.
You should also use standard load balancers, multiple web servers, etc.
Beyond that, be very careful to keep your architecture as simple and straightforward as possible. I've seen people create horribly complex systems with multiple layers of RPCs because they "need to scale" and then find that they need a ton of hardware because of RPC overhead. With a proper architecture, you should be able to have a site in the top 1000 busiest websites using only a handful of webservers. If your architecture can't do that, odds are very good that the problem is that you have a bad architecture, and not that you have too many users.
That said, if you've got a very, very complex website, with insane traffic, then you need to do something much more complex. You'll want to distribute everything. And you'll want to layer things with RPC calls to backend services that themselves do the same thing. The RPC calls should be as efficient as possible. (Google uses protobuf for this. DO NOT use XML. If you want human readable, use something like JSON. Trust me on this.) Furthermore you absolutely need to have very sophisticated monitoring on your systems. If pages get slow, you need to be able to track which RPC call 3 layers deep is slow. Furthermore if a particular RPC layer is getting overloaded or slow, you need tools to automatically detect this, and track down where the problem is coming from.
Trust me when I say that this is a complex architectural problem. (I've seen Google's infrastructure for handling this. It is a lot easier in theory than practice.) Please trust me further when I say that you really don't want to open this can of worms until after you've demonstrated a traffic volume where it makes sense. If you try, you're likely to wind up being Yet Another company patting yourself on the back for successfully delivering 300,000 hits/hour with 50 webservers, not realizing that 1 should be enough.