- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I'll make an interesting comment someday. Someday...
Admin
Needs more context. Like why the proxy.pac was involved in the staging. I'm guessing that some system had this file deployed on it and the server with the tumbleweeds was one that should have been listed but wasn't?
Admin
Did you enter it in your ever-growing backlog?
Admin
Admin
When the logs are empty, I always check the proxy.pac. ALWAYS! Do it too!
Admin
OOOH! I like the RFC 1918 compliant IP addresses.
Admin
I'm further guessing that the original purpose of that proxy.pac was poor-man's load balancing, that the two proxy strings inside it were supposed to have the proxy servers presented in the opposite order, and that it had not been updated after the third proxy was added.
By replacing it all with a one-liner, our hero has arranged for the first proxy listed to be hammered mercilessly and for the other two to end up with logs as mysteriously quiescent as the one that originally piqued his curiosity.
Something like this would better fit the original intent:
Admin
I'd be tempted to use a random shuffle and then generate the proxy config string from that. I'd also check after the fact whether the proxies are all getting (roughly) equally hit.
Admin
Personally I like the client IP hashing approach better than the random shuffle approach, purely because it makes any given client's proxy settings completely stable; this avoids a whole bunch of potential failure modes for clients.
I'd be very surprised to find that a random shuffle actually yields a usefully more even spread across the available proxies, too. Though you're of course completely correct to say that's something that should be measured rather than assumed.
Admin
Okay, so let's see. Heads is server 1. Tails is server 2. Hmm....on edge is server 3.
Admin
You're a funny, funny owl.
Admin
Yeah, I was thinking that it was
refactoredchanged to use one server, but not simplified as much as it should be.Admin
TRWTF is anyone who uses proxy.pac to direct requests toward anything that isn't a proxy server.
Admin
whoooo?
Admin
It depends how many clients there are. If many of the clients come from the same organisation and are using the same external IP address, the same proxy gets hammered. Randomisation is safe, hashing isn't.
Admin
That would be true if the IP address were being evaluated server-side, but proxy.pac is a workstation thing; myIpAddress() returns a local workstation IP address, not the organization's possibly-shared public IP address.
Admin
What exactly does a picture of a London Underground tunnel have to do with a wonky proxy setup? The fact that there's a switch/point?
Admin
Ah, but I'd do the randomization on the server that delivers the proxy.pac, so the workstations would see a trivial function returning a constant. (That might well change if they refresh it; we'd be relying on client caching, but they do that anyway.)
Runtime code generation? Yeah, I'm happy with that.
Admin
That would certainly be less failure-prone than doing client-side randomization, but still looks like work for no benefit to me. I'd be interested in measurement results, of course.
Admin
2 servers give 2 possible orders. But 3 servers should generate up to 6 strings. There is more than just rotation of the original string, it can be reversed too.
4 servers is even more interesting: 4! strings (20)
If the shuffle is to be local-based, just use a global counter and keep incrementing.
Admin
@discoursebot what do you say about inablility to escape angle brackets without monospace-ing the font?
Admin
@Gaska - Days Since Last Discourse Bug: 0
<!-- Posted by SockBot 0.13.0 "Devious Daine" on Wed Nov 26 2014 09:46:32 GMT+0000 (UTC)-->Admin
< => <
> => >
i see no monospacing here.
Admin
That's not escaping. Besides, I like my source to be readable. ampersand-(random-letter)*-semicolon isn't readable. This is one of the things I hate most in HTML (the other being CSS).
Admin
-shrug- up to you mate.
Admin
Markdown - excellently readable source, WTFy interpretation!
Admin
IMO Markdown was best back in IRC times where it was individual people who decided what asterisks look like to them.
Somewhat related: I also hate graphical emoticons. :& means "I don't know what to say", not throwing up FFS!
Admin
wat :arrow_right: :x: yes,
:x:
Admin
wat's wrong with that?
Oh look, you can't \-escape that style of emoji in a quote. </Khaaaaaaaan>
Admin
:$ and :-$ in Discourse are :blush:
Admin
Admin
Waitwaitwait. Hold the phone. HOLD FUCKING UP FOR A SECOND HERE.
Are you saying that dollar signs ($) don't render for you?
edit: meant to reply to @gaska, too late to fix it
Admin
If you live in a perfect world, congratulation.
But in a real world, sticking to a rotating string for load-sharing is asking for trouble of cascading server's issue when the first one fails, all its load would go to the second... which can more easily go down on its knee... then the third get the whole traffic and the service collapse.
So I stick with a somewhat more load-sharing solution: with 3 nominal servers, the 6 variants of proxy should be used, just to avoid cascading the problem from one server to a single next one. It's all about sharing the trouble.
Admin
What I would do is have n-1 proxies dedicated as first-line proxies, and 1 exclusively as backup for any of them. But that requires one more server, and in the perfect world the managers live in, it's not cost effective.
Admin
Admin
Yes. Because chrome. Use a zwnj instead :$
Admin
^ that. Actually, Opera. But that's still Chromium.
Admin
A lesson is learned. I'll switch to using backticks though, it's easier.
Btw, no repro on my Chromium, under Linux.
Admin
Windows Chrome has really WTFy unicode support - as mentioned in many other threads.