mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 49 forks source link

SQL Store and Web Farm - files not being syncd #179

Closed richardjharding closed 12 years ago

richardjharding commented 12 years ago

Hi,

We are deploying to a web farm of 2 IIS servers - I've got version 1.8.32 of RequestReduce.dll and RequestReduce.SqlServer.dll - both from the net35 build and we are having some options getting it working correctly

In a single box setup it works fine I can see the sql tables gettting populated and the RequestReduceContent is being used as the source for files

But in the web farm setup the contents of the two RequestReduceContent folders are different (both have files they just dont have the same files) and this is resulting in 404's for css , js etc - in these cases the requested url exists in the db but its present on only one of the servers (hence the 404 for some requests)

First to check my understanding of how it works should the RequestReduceContent folder contents be identical on both servers?

Any idea whats preventing one of the servers from fetching the matching file from the sql db?

The onyl thing unusual with the set up is we have same physical files being served on 2 different urls - for example

MyAppA.testserver MyAppB.testserver

both point to the same physical file location

Could that effect how files are resolved and syncd?

Any help much appreciated

Richard

mwrock commented 12 years ago

My apologies for the delayed response. Just getting back from vacation.

The folders will not necessarily be identical. The file system in a sql synced setup acts as a local cache so that every request does not incur a db hit. So if server A gets a request for StyleA.css and styleA is not on disk, it will serve directly from the DB and save a copy of StyleA to disk. If StyleA is not served for five minutes, it will then be removed from disk. So what is on disk depends on recent traffic in to that server and may not be the same as what is on other servers.

The fact that you are serving the files from 2 different URLs should not have an impact. RequestReduce should treat these as two separate files. It doesn't know they are the same.

Can you reply with your RR config setting and I can have a look?

mwrock commented 12 years ago

I'm closing this for now but please send your RR config settings if this is still affecting you. thanks!