Login Register

Forum photos/images now load faster (much)

General discussion about Volvos, Volvo parts, your DIY skills, Volvo ownership, and more. Come on in, introduce yourself and say hi! List Volvo events here. Have a nice Volvo? Show it off here. Do you have a question or comment about how MVS works? Ask here.
Post Reply
User avatar
matthew1  
Site Admin
Posts: 14460
Joined: 14 September 2002
Year and Model: 850 T5, 1997
Location: Denver, Colorado, US
Has thanked: 2650 times
Been thanked: 1240 times
Contact:

Forum photos/images now load faster (much)

Post by matthew1 »

I made a change to how images are served here at MVS. I'm proud of this, so I'm doing a little victory lap. Images are now cached at the "edge" of Cloudflare's system, so if you're in Tokyo, Paris, Newark, Dar es Salaam, wherever... you'll get the image from a CF server near you. Before, every request for a forum image came from the MVS server. Now the first request from anyone anywhere will come from the MVS server, but every additional request for that image will come from an "edge" server close to wherever you are.

If you didn't know, distance does matter. The MVS server is in NYC. When you load a page here it comes from there. The farther away you are from NYC, the longer it takes for the page to load. Cloudflare has 330 edge server locations around the world.

So these forum images are now cached at a closer location to you now, unless you're already very close to NYC. It's a smart system, so it'll generally use the closest edge server to you to serve any given image.

Cloudflare is a service I've used for MVS for about ten years. It sits between the MVS server and you and speeds things up, stops attacks and general BS, and does other helpful utilities.

If you know a little about the internet, you might be wondering why didn't I just press the CACHE EVERYTHING button ten years ago and take a nap. I could have done that, but then the forum threads/posts wouldn't update. They'd still be stuck at 2015! (or whatever cache interval I'd have set before my nap) So the images are a bit of a carve out from that. The trick is to cache as much as I can, but not forum posts themselves.

Real example download/file.php?id=95599&t=1 I used for testing before and after this change:

before 332 ms
after 38 ms

That's a magnitude, dude.
Help keep MVS on the web -> click sponsors' links here on MVS when you buy from them.

Also -> Amazon link
. Click that when you go to buy something on Amazon and MVS gets a cut!

1998 V70, no dash lights on

1997 850 T5 [gone] w/ MSD ignition coil, Hallman manual boost controller, injectors, R bumper, OMP strut brace

2004 V70 R [gone]

How to Thank someone for their post

Image

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

Ok, but there are other caching issues, too aggressive.

User avatar
matthew1  
Site Admin
Posts: 14460
Joined: 14 September 2002
Year and Model: 850 T5, 1997
Location: Denver, Colorado, US
Has thanked: 2650 times
Been thanked: 1240 times
Contact:

Post by matthew1 »

Dikidera, are you getting stale pages?
Help keep MVS on the web -> click sponsors' links here on MVS when you buy from them.

Also -> Amazon link
. Click that when you go to buy something on Amazon and MVS gets a cut!

1998 V70, no dash lights on

1997 850 T5 [gone] w/ MSD ignition coil, Hallman manual boost controller, injectors, R bumper, OMP strut brace

2004 V70 R [gone]

How to Thank someone for their post

Image

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

Yes, for the past 1 year and these days I am also seeing other people's accounts appear as my own as if I am logged into theirs. I can also see people's inbox.

User avatar
matthew1  
Site Admin
Posts: 14460
Joined: 14 September 2002
Year and Model: 850 T5, 1997
Location: Denver, Colorado, US
Has thanked: 2650 times
Been thanked: 1240 times
Contact:

Post by matthew1 »

[edited]


Let's find a fix for it here viewtopic.php?p=661411#p661411
Help keep MVS on the web -> click sponsors' links here on MVS when you buy from them.

Also -> Amazon link
. Click that when you go to buy something on Amazon and MVS gets a cut!

1998 V70, no dash lights on

1997 850 T5 [gone] w/ MSD ignition coil, Hallman manual boost controller, injectors, R bumper, OMP strut brace

2004 V70 R [gone]

How to Thank someone for their post

Image

Post Reply