Jump to content

Anyone using a squid proxy?


You are about to reply to a thread that has been inactive for 3605 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I recently set up the squid caching proxy on my server and have been caching SL on it for two days now. Just wondering if anyone else is using squid and has any SL specific configuration tips.

I basically followed the guide here: http://wiki.phoenixviewer.com/squid_proxy_cache although I've set up squid before for general caching.

Squid seems to be working OK, it's certainly caching and is up to 1.3GB now, out of the 500GB partition I cleared for it. I only use it for SL.

A side benefit of the above is that my connection on the internet side of the cache is a dedicated public IP address with no NAT or anything to slow things down. Just simple (but effective) firewalling with a proper Cisco router.

It's a bit hard to tell yet if it is actually beneficial because I had to do a clean install of Firestorm so lost my local caches. Everywhere is now taking an age to render first time I visit. 'Texture Refresh' often seems to lose as much as it refreshes, lol.

Oh, and an odd issue of some objects simply refusing to render for my wife's account, at all, no matter what I try. I know they are there because I can see them in my main account, but my wife's account can't see them or click them etc... they just don't exist for her.

Link to comment
Share on other sites

I've done that for a while. There's a fairly big problem: The way SL requests the data stream is useless for Squid. Unless things have changed drastically in the last year or two, the request lookls like this:

GET /cap/f95c2fe5-f3aa-03d8-57ae-7c2afe6bcb4f/?texture_id=639ac44b-edb2-16ac-67dc-69a87fcb9e99

That "cap" UUID changes with every login, thus Squid never hits the cache. You'll get benefits while logged in, but since SL has its own huge cache the benefits are negligible. It certainly does not work as one would expect a cache to work.

There is a way to cache SL if you have a separate Linux gateway through which all your traffic flows. You'd have to redirect all requests on port 12046 to your own "server" which then parses the request, checks if it has it in its own cache (mySQL or whatever) and returns it from there if it can, or if it doesn't have the object, fetch it from SL's servers using the original request. If you know your way around iptables and any programming language of your choice it's not too difficult to do. I still have my code for that, but haven't used it in a year or so. The lines you'd need to parse are in the snippet from my own code below.

// The viewer requests data in this manner:
// GET /cap/<TMP_UUID>/?texture_id=<TEXTURE_UUID> HTTP/1.1
// Host: simXXXX.agni.lindenlab.com:12046
// Connection: keep-alive
// Keep-alive: 300
// Accept: image/x-j2c
// Range: bytes=0-599

Caveat: IMO it's not worth it. Yes things load faster, but unless you have multiple clients on the same network, it's useless. If you do, it'll make a big impact on your traffic use though.

Link to comment
Share on other sites

Thanks Jenni, what you say is exactly what I have discovered over the last few days as I've watched the traffic, looked at the headers and done more reading.

That, and the issue of some objects simply never loading which went away as soon as I removed the proxy.

While I do occasionally have up to three active clients here, I think the effort required to implement a better solution isn't worth it. My network connection is quite good. I just have a habit of trying to optimise everything.

As of last night, I removed squid from the chain. I reprogrammed the router to still use a dedicated public IP for SL with static NAT. So, no NAT/PAT translations to get in the way. So far the only benefit I'm sure of is the lower CPU use on my router, lol. Not that is was exactly overloaded in the first place, the thing is good for far more traffic than my WAN connection can give it.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3605 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...