Here are a few recommendations for high-traffic deployments in which most users are
anonymous. Anonymous users tend to visit merely to read content rather than
contribute. Because they’re anonymous, by default there’s very little about their
experience that will be customized. As a result, you can typically afford to serve
them cached content rather than freshly rendered dynamic content.
- Recognize anonymous users from the cookies the application sets. These
cookies are available in 1.x versions as of 1.10.3 and in version 2.0.1, but
are unavailable in version 2.0. If you’re using a version in which they’re
not available, you should consider upgrading.
- Offload page caching to dedicated cached-content servers. With large numbers
of anonymous users, you should consider using a content delivery network
(CDN) such as Akamai or Limelight to serve cached content to anonymous
users.
- Avoid sending a max age page cache header back to the client if the
anonymous user will be able to log in. If the browser caches the page, then
the newly logged in user might not receive fresh dynamic content.
- Consider caching resources such as CSS, Javascript, and decorator image
files, which tend to rarely change. In fact, consider caching these
resources for days if you expect not to be deploying new versions of them.
- Use the Query Stats feature to track database queries. The Query Stats page
of the admin console can display SQL statements executed, how often they’re
executed, and how long the query takes. The number of queries you see when
browsing your front pages should be low. For more information about this
feature, see Examining Database Queries.
- When you have a large percentage of anonymous users but the overall number
of page views is smaller, use the application's built-in server-side page
caching. Starting with version 2.0.0, the application can Server-Side Page Caching. You can enable the cache and set maximum age and
expiration thresholds.