The database tier is usually always a bottleneck, and often the significant one. That means it’s imperative that you have a caching layer to minimize database access and remove it from the critical path. Memcached may be a good option when a key-value store is sufficient.
However, many real-world scenarios involve complex domain models. In these cases, it’s much better to use an in-memory data grid that works with domain objects and which can handle embedded object relationships.
An in-memory data grid is also very helpful if you need high-availability, elastic scaling, maximum performance, and perhaps want to create an event-driven architecture or pre-process data before it hits the database. Here’s a good video describing how some of the biggest players do it:
http://youtu.be/1AR2WWaP8CE
Another major optimization would be in reducing the time to download content, so you’ll also want to use a content delivery network. Start with these 2 optimizations and you may find that performance is no longer an issue.
Norm