May 18th, 2001

bike
  • jnala

Why friend graphs don't work

I've been talking to Stephen North, the maintainer of webdot at AT&T. The problems with friend graphs are because

1) Webdot sends the following request:

GET /friends/graph/alanj.dot HTTP/1.0
User-Agent: webdot
Accept: */*

LiveJournal sends a 404 in response to that request. It won't send the requested content unless there's a Host header. I'll suggest to Stephen that he add the Host header to webdot's request, but who knows when he'll get to it, especially since he's out of the office for the next two weeks. If we can make the request work on LJ's end for now, that'd help.

2) Webdot has issues; it occasionally gives 500 Internal Server Error on certain graphs for no apparent reason. A new version is at http://www.research.att.com/~north/cgi-bin/x-webdot/webdot.cgi and we should use that for the time being.

3) The AT&T server places caps on the amount of CPU you can use for a graph display request. My friend graph takes about a half-second to render, and I don't have very many friends. Someone with 150 friends and friendofs will probably take 25x as long, and will be very likely to run into the cap. No solution here except to run webdot ourselves (expensive) or make people render graphs client-side (requires Java and some effort setting up stuff to make it work).

Virtual hosts

Continuing the explanation of why friends graphs don't work....

The Virtualhost order changed, but because it had to. I'm aware the "default" is now mrtg.livejournal.com.

Before we had:

1) livejournal.com www.livejournal.com
2) mrtg.livejournal.com
3) *.livejournal.com

When I did the rewrite stuff, it changed to:

1) livejournal.com *.livejournal.com
2) mrtg.livejournal.com

But that broke mrtg, because vhost #1 caught mrtg.livejournal.com with that *.livejournal.com alias

So I moved mrtg.livejournal.com above.

Screw broken HTTP/1.0 clients. Host: headers have been in use for years before HTTP/1.1, even. Netscape 3.0 sent them, IIRC, and maybe even 2.0.