For the Akamai CDN to work effectively with Drupal in Acquia Cloud, you should be aware of several key points and settings.
Determine the behavior of the 'omit_vary_cookie'
As of the Acquia Cloud 1.59 release, the default value to remove the
vary header was set to TRUE; therefore the
'omit_vary_cookie' setting is not needed. Switching this setting enables the
vary header, which causes requests to bypass Varnish.
You can prevent Acquia from sending the
Vary: Cookie header (
Vary: Accept Encoding). If there is logged-in traffic, Acquia is set to strip this header by setting a
max-age=0 header for the browser.
Acquia doesn't suggest that you omit this header on the hosting side. If you don't set this header and you attempt to test or edit without using Akamai, you may see anonymous content, or anonymous users may see signed-in content.
If you have signed-in users or interactive elements (such as comments or forms), Acquia recommends that you work directly with Akamai to bypass the cache for
SESS cookies, for example, and potentially for
NO_CACHE cookies as well.
If, for some reason, you need the
Vary: Cookie header, add the following code to the
$conf['omit_vary_cookie'] = 'TRUE';
Ensure that Varnish caching continues on load balancers
Disabling Varnish caching on load balancers goes against all recommendations. Akamai services work best with Varnish to support capacity. This is especially important if the Akamai service needs to completely clear the cache, because this can result in a spike in requests to the origin server. Acquia recommends that you set the Varnish cache to a lower interval than the Akamai refresh, which provides a balance between content freshness and site load.
Ensure that visitors use the correct IP address
To determine the true address for incoming visitors, you will need to have the
reverse_proxy_header set for your site. When you create the support ticket, be sure to include the Akamai header that you're using, or have it available for reference. You can customize this variable name with Akamai or any other CDN. This header may be called
True-Client-IP, but it may also have a custom name created by you.
Contact your TAM
If you're an Acquia client that has a Technical Account Manager (TAM), engaging your TAM is the most effective and efficient method to start using Akamai.