Skip to content
 
If you can read this, either the style sheet didn't load or you have an older browser that doesn't support style sheets. Try clearing your browser cache and refreshing the page.
URL cleanup coming shortly
Posted by Mike at 2009-02-26 2:14:51 AM, edited 2009-02-26 1:10:40 PM (28 comments) | Permalink
More: FarkBlog

•       •       •

9 clicks; posted to Main » on 26 Feb 2009 at 2:14 AM (10 years ago)   |   Favorite    |   share:  Share on Twitter share via Email Share on Facebook   more»



Here is the short version: sometime next week, we'll be doing a very-long-overdue cleanup of our URL's. All of the forums.fark.com and cgi.fark.com etc stuff will get moved under www.fark.com, and all the /cgi/fark stuff will change to just /cgi. So URLs like

http://www.fark.com/cgi/comments.pl?IDLink=1
http://www.fark.com/cgi/users.pl?self=1


will change to

http://www.fark.com/cgi/comments.pl?IDLink=1
http://www.fark.com/cgi/users.pl?self=1


All of the old URL's will continue to work probably indefinitely, so you don't need to actually change any bookmarks... though the site will load very slightly faster if you do.

So, not a huge change, yeah, but makes things a little shorter and easier to remember... and it gives us an infrastructure to add some new features we've long been unable to add. And it probably won't even affect you, except for maybe eventually tweaking some bookmarks... except for:

Hey Photoshoppers: if you've set up hotlinking allow/block rules on your image host, as described in our handy FAQ entry on the subject, you will probably need to change those rules, or risk some of your Photoshop entries being unviewable, or unfetchable/unpostable -- because the rules check the URL, and once the URL's change, the rules might stop working. So, I've updated the FAQ entry with with a new set of examples that will work with either our old or our new URL scheme. Update your .htaccess files now and you'll be all set. Easy.

End of short version.

Scroll down to see the longer nerd-out version if that kinda stuff interests you.
· · ·

28 Comments     (+0 »)
 
 
2009-02-26 02:27:18 AM  
The reason the cgi URLs all had /cgi/fark dates way back 10 years to a long-gone cgiwrap config, when Fark was sharing a single machine with about 200 other websites. The need for that disappeared when we got our own hardware, which was in about, uh, 2001 or so... At the time I didn't fix it because I wasn't very good with mod_rewrite, or for that matter regexps in general. That's not the case anymore, so, we're fixing it. :)

As for the different hostnames, that's a bit harder...

They aren't actually different machines, or even clusters of machines, they're separate Apache instances running on different IPs on the same set of machines. (Some people would run them on different ports on the same IP but for various reasons, we didn't do it that way.) The reason they're split up is because mod_perl, which handles all the cgi scripts, uses a lot of memory to get its performance by keeping all the scripts pre-compiled in memory at all times, so there's no fork/compile overhead on each hit. But the front page of Fark, and all the front tab pages, are all static files and not scripts run on the fly -- that's the #1 reason we can run on such minimalist hardware. So www.fark.com runs a stripped-down Apache instance with mod_perl removed, which of course cuts memory overhead way down. img.fark.com is stripped down even more than that... and in fact last year we switched the img.fark.com vhost from Apache to lighttpd to get it streamlined even more. The cgi.fark.com vhost was getting kinda memory-bloaty, so we split the higher-volume go.pl and comments.pl stuff out to two more Apache instances with just those scripts preloaded.

But having all these hostnames makes the site look ugly and it makes stats difficult... and having the front page static severely limits possible features -- for example, it's why we can't have any per-user customizations for the front page of Fark. There's a hell of a lot of cool things we could do if we had that, but we can't exactly have an ugly cgi.fark.com/cgi/fark/* URL mess for our main page either. And for performance reasons it'd be nice to keep serving the static one if the user isn't logged in. Merging all the configs back into one isn't real practical either -- sure, memory and CPU are much cheaper these days, but they're not free :)

So the easy solution is to just stick a reverse proxy on the front of everything, with a bunch of URL rewriting rules; that way, you can have all the microoptimization of multiple Apache configs yet still have a unified looking front end. It's a pretty common setup for sites running things like Rails.

After researching the tons of options available for doing that -- using our existing load balancers' URL switching features, using Apache's existing mod_proxy (which I use in production on another site), our current lighttpd, or other things like nginx, Squid, Varnish, haproxy, pound, perlbal, etc etc... after a few days my head started to hurt and I finally decided to start playing with nginx. Turns out it benchmarked faster than lighttpd for just image hosting too, which in turn was faster than Apache (prefork mpm, anyway; worker mpm's likely comparable)

So that's the new architecture... nginx in front serving as much static content as possible, existing Apache behind it for dynamic content, and rewrite rules to transparently hide the Apache mess. I'm already running foobies.com and our images in production this way, and the setup for www.fark.com is reasonably well tested and ready to roll... but as I've got plans this weekend that involve a lot of alcohol, I'd rather not roll it out until next week just in case something goes unexpectedly blooey.
 
2009-02-26 04:44:27 AM  
okidoki.
 
2009-02-26 05:36:16 AM  

Mike: Lots and lots of words



But the question remains: "Will we get over it?"
 
OKO
2009-02-26 05:57:45 AM  
One long night coming up. GOOD LUCK !
 
2009-02-26 07:50:54 AM  
is shortly like soonly?
 
2009-02-26 09:30:35 AM  
Will I still have to pay shipping and handling?
 
2009-02-26 09:53:41 AM  
So, anyone want to explain this to a tech tard?
 
2009-02-26 09:58:52 AM  

basemetal: So, anyone want to explain this to a tech tard?


From what I can decipher, the Fark servers are set up in some particular way. Now, they are going to set them up a different way. Aside from that, I have no blooming idea.

/glad I could help
 
2009-02-26 10:06:28 AM  

basemetal: So, anyone want to explain this to a tech tard?


Goal = Simplicity

Thanks for the info Mike. I'm off to look at nginx.
 
2009-02-26 10:08:58 AM  
So, since nginx is Russian does this mean that FARK will now serve you?
 
2009-02-26 10:23:47 AM  
*waves "Hello!" to Mike*
 
2009-02-26 10:24:16 AM  
Oooooooooooooohhhhhhhh.

Are we the only ones that read this?
 
2009-02-26 11:21:34 AM  
Gotcha!

/wink
 
2009-02-26 11:30:38 AM  
Intriguing...

/looks at pathetic, archaic skill set and whimpers
 
2009-02-26 04:57:27 PM  
I wonder if Farky will still work?
 
2009-02-26 05:15:11 PM  
this means the parents are gone for the weekend . PARTY!
 
2009-02-26 05:59:12 PM  
Some of what Farky does couldn't be built in at our end because of the whole static-front-page thing, which prevents per-user front page customizations. Fixing that and allowing us to add that kind of functionality is part of why we're doing this.

So short term though, yes it likely will break, long term, it won't be needed as much anyway. I don't even know who maintains that thing anymore, but if they email me I can see about helping them write a patch.
 
2009-02-26 06:06:53 PM  

mikaloyd: I wonder if Farky will still work?


It should still work in threads, but will probably not work on the front/tabbed pages if they put in customizations that were mentioned. The Farky extension is about due for an overhaul, anyway.
 
2009-02-26 07:26:38 PM  
wooooooo this sounded cool for a little bit...
 
2009-02-26 07:54:53 PM  

Mike: I don't even know who maintains that thing anymore, but if they email me I can see about helping them write a patch.


You're a good man, Mike. I forgive you for spilling booze on the servers.
 
2009-03-01 03:25:27 PM  

basemetal: So, anyone want to explain this to a tech tard?


Probably not.
 
2009-03-01 03:47:53 PM  
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
 
2009-03-01 04:17:56 PM  

chud21: Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard
Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard Tech tard


Sticks and stones may break my bones but I'm still a tech tard......wait
 
2009-03-01 04:34:46 PM  
woooo still not sounding too cool still...
 
2009-03-01 04:49:49 PM  
Re-read the original blog post up to the words "all the old URLs will continue to work" and that's all you need to know in as simple terms as anyone can really put it.
 
2009-03-05 04:17:06 PM  
Friday (Mar 6, tomorrow) 5 PM ET is when this switchover happens.
 
2009-03-06 05:45:26 PM  
OK, that didn't go super smoothly, but it's done
 
2009-03-07 04:38:56 AM  
LOL! Done is done.
 
Displayed 28 of 28 comments


This thread is closed to new comments.

Continue Farking





On Twitter




In Other Media
Top Commented
Javascript is required to view headlines in widget.
  1. Links are submitted by members of the Fark community.

  2. When community members submit a link, they also write a custom headline for the story.

  3. Other Farkers comment on the links. This is the number of comments. Click here to read them.

  4. Click here to submit a link.

Report