SOLVED

Server Response Time

Go to solution
Robb_Barrett
Level 10

I know that we can't enable caching, but what can be done to fist laggy server response times? I've been checking my pages on Google's PageSpeed Insights tool and last night I got an 86, this morning a 73 mostly due to laggy server response times. My most recent test is 1.6 seconds and Google is red flagging it.

I'm also getting flagged for our server not using gzip compression.

These factors, from what I've read, make The Algorithm not love my pages but they're not things I have any control over as they're server-side.

Robb Barrett
1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

Thanks, Edward! Yes, you can get major improvements by loading Marketo LPs and assets though a CDN such as CloudFront or Fastly.

Not only that, but you usually get SSL onboarding for free, which is a major cost advantage.  The overall cost for your domain might  be < $20 per month, especially if you give everything a nice long expiry (for Marketo to offer this service to all customers for free would be a financial hit for them, but for an individual site it can be a near-negligible expense).

View solution in original post

15 REPLIES 15
Hiram_Cruz
Level 2

Thanks Sanford, how can you load marketo assets through a CDN? Will this work if you are using non-marketo landing pages? We're trying to improve site speed performance and the highest priorities for Marketo are:

Leverage Browser Caching:

Enable gzip compression:

Thanks for your contribution on this subject! 

- Hiram

SanfordWhiteman
Level 10 - Community Moderator

Yes, you can load Marketo assets via a CDN from non-Marketo LPs, though it is not as straightforward since the paths are not relative (simply serving your LP domain via CDN includes all relative paths as well).

But don't overreact to claims like "expiration not specified."  Automated testing tools want to be as alarmist as possible, but they are often incorrect. "Not specified" doesn't mean "not cached." It means the browser heuristically caches the assets according to its own internal algorithm. You can see easily in your Dev Tools that such assets are still loaded from your local computer's cache, and passing them via CDN, for a single end-user, would not make them any faster. Caching assets at the CDN has benefits for other users, but that is not exactly the same question.

Hiram_Cruz
Level 2

So if you're already using a CDN for your LP domain, your marketo assets are already being cached and delivered along with your other assets? LP: http://www.cpcstrategy.com/amazon-a-content-guidebook-brands/

Anything we can do in regards to gzip compression on Marketo files?

SanfordWhiteman
Level 10 - Community Moderator

So if you're already using a CDN for your LP domain, your marketo assets are already being cached and delivered along with your other assets? LP: http://www.cpcstrategy.com/amazon-a-content-guidebook-brands/

Only if the assets use relative URLs: href/src attributes that begin with a single slash ("/folder/subfolder/page") or a partial pathname (like "folder/page").

When URLs begin with double slashes // or with a protocol, they do not use the main document's hostname, they use the hostname that's explicitly present in the URL.

On Marketo-hosted LPs, assets like the Forms2 library load from a relative URL, so if the main document loads via CDN, then so do those assets, automatically.. (That's the default behavior, but it can be advantageous to change it in other scenarios that I'm getting into in an upcoming blog post.)

On non-Marketo LPs, Marketo assets can't load from a relative URL, thus even if the main document is CDNed that doesn't automatically propagate to the assets.

Gzipping dynamic assets like form descriptors can actually add more overhead (the server-side compression component is not instantaneous) than the bytes on the wire cost you in network overhead. Be aware that the response to getForm? is recomputed every single time it is requested: if this were not done, then you couldn't update a form and have the update take effect around the world instantly. I can't say whether the overhead of constant gzipping is worth saving 3500 bytes on the wire, but there's a good chance that it would work in the other direction, depending on server horsepower.

Hiram_Cruz
Level 2

Thank you for response!

Edward_Unthank_
Level 10

You can move all your assets (images, CSS, JS) hosted on Marketo to a CDN instead, which can increase performance quite a bit if you're not already doing this. If you're looking to go beyond that and don't use server-side dynamism as much, you can take it further and apply your own caching to Marketo. That's one of Sanford Whiteman​'s area of expertise.

Cheers,

Edward

SanfordWhiteman
Level 10 - Community Moderator

Thanks, Edward! Yes, you can get major improvements by loading Marketo LPs and assets though a CDN such as CloudFront or Fastly.

Not only that, but you usually get SSL onboarding for free, which is a major cost advantage.  The overall cost for your domain might  be < $20 per month, especially if you give everything a nice long expiry (for Marketo to offer this service to all customers for free would be a financial hit for them, but for an individual site it can be a near-negligible expense).

ElliottAntal
Level 2

Hi Sanford - I know this original post was from 2016, but are CloudFront or Fastly still your leading recommendations for CDNs to serve Marketo LPs from?

SanfordWhiteman
Level 10 - Community Moderator

Since this post, Marketo has started using CloudFlare themselves, so it's not usually pressing (and can be tricky) to use another CDN outside of that. I would only go down that road if you have a specific technical or performance goal.

Amy_Lepre
Level 7

It seems a bit ridiculous to be paying Marketo as much as we do and still have to use another paid source so Marketo's system isn't slow. I expect speed and responsiveness to be a part of the solution I pay Marketo for.

Robb_Barrett
Level 10

Gospel-Choir[1].jpg

Robb Barrett
Anonymous
Not applicable

When using Fastly as a CDN how would you fix this issue where everyone's inferred company shows up as Fastly?

Screenshot 2016-03-28 18.09.04.png

SanfordWhiteman
Level 10 - Community Moderator

Are you rewriting content (for example, script sources)?  What you're showing won't happen with a correct CDN setup.  Form posts and Munchkin hits don't go through the CDN.

Billy_Jones1
Level 1

Sanford Whiteman​  Can you share the steps to hosting your Marketo assets through your CDN ?

Josh_Hill13
Level 10 - Champion Alumni

Depends on the code you have on the page too, right? Ask Support to see if your instance or pod is having issues.


if speed is that important that 1.6s is too slow, then you may want to push your forms and pages to your main site.