Re: kernel.org mirroring (Re: [GIT PULL] MMC update)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Jeff Garzik <jeff@...>, H. Peter Anvin <hpa@...>, Rogan Dawes <discard@...>, Kernel Org Admin <ftpadmin@...>, Git Mailing List <git@...>, Jakub Narebski <jnareb@...>
Date: Friday, December 8, 2006 - 9:56 pm

On 12/9/06, Linus Torvalds <torvalds@osdl.org> wrote:

I don't know if fundamentally flawed but (having used memcached) I
don't think it's a big win for this at all.

We can make gitweb to detect mod_perl and a few smarter things if it
is running inside of it. In fact, we can (ab)use mod_perl and perl
facilities a bit to do some serialization which will be a big win for
some pages. What we need for that is to set a sensible the ETag and
use some IPC to announce/check if other apache/modperl processes are
preparing content for the same ETag. The first-process-to-announce a
given ETag can then write it to a common temp directory (atomically -
write to a temp-name and move to the expected name) while other
processes wait, polling for the file. Once the file is in place the
latecomers can just serve the content of the file and exit.

(I am calling the "state we are serving" identifier ETag because I
think we should also set it as the ETag in the HTTP headers, so well
be able to check the ETag of future requests for staleness - all we
need is a ref lookup, and if the SHA1 matches, we are sorted). So
having this 'unique request identifier' doubles up nicely...

The ETag should probably be:
 - SHA1+displaytype+args for pages that display an object identified by SHA1
 - refname+SHA!+displaytype+args for pages that display something
identified by a ref
 - SHA1(names and sha1s of all refs) for the summary page


You _could_ make do with a convention of polling for "entryname" and
"workingon-entryname" and if "workingon-entryname" is set to 1, you
can expect entryname to be filled real soon now. However, memcached is
completely memorybound, so it is only nice for really small stuff or
for a large server farm which has gobs of spare ram.

(Note that memcached does have timeouts which means that the
'workingon' value could have a short timeout in case the request is
cancelled or the process dies - the nasty bit in the above plan would
be the polling.)


Apache doesn't do it because most web applications don't use the HTTP
procol correctly - specially when it comes to the idempotency of GET.
So in 99% of the cases, web apps serve truly different pages for the
same GET request, depending on your cookie, IP address, time-of-day,
etc.

Most websites deal with very little traffic, so this isn't a problem.
And many large sites that serve a lot of traffic from a dynamic web
app want to be serving custom ads, let you login and see your
personalised toolbar, etc,etc, so this wouldn't work for them either.

So in practice, serialising speculatively on GET requests for the same
URL has very little payoff except for static content. And that's quite
fast anyway.... specially if the underlying OS is smokin' fast ;-)

cheers,



martin
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Fri Dec 8, 5:43 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Junio C Hamano, (Thu Dec 7, 4:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 4:09 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Junio C Hamano, (Thu Dec 7, 6:11 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Shawn Pearce, (Thu Dec 7, 3:39 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Thu Dec 7, 3:58 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Thu Dec 7, 7:33 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:58 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Olivier Galibert, (Thu Dec 7, 3:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 3:57 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Rogan Dawes, (Fri Dec 8, 8:57 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 12:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 12:35 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Fri Dec 8, 12:54 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 7:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Steven Grimm, (Sat Dec 9, 3:56 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 9:56 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 7:51 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 8:42 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sat Dec 9, 11:55 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sun Dec 10, 3:05 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Tue Dec 12, 5:19 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sat Dec 9, 2:04 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 2:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 9:37 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 12:07 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 6:09 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 8:41 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 9:02 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 9:45 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 3:11 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:05 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 6:59 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 10:16 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Mon Dec 11, 4:59 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Mon Dec 11, 6:18 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sun Dec 10, 3:50 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sun Dec 10, 5:01 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sun Dec 10, 4:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Sun Dec 10, 4:30 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:08 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sun Dec 10, 6:01 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sun Dec 10, 6:14 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 10:43 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Sat Dec 9, 1:02 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 1:27 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Fri Dec 8, 7:46 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Linus Torvalds, (Fri Dec 8, 8:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Sat Dec 9, 5:27 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Sat Dec 9, 12:36 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 8:51 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 7:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Michael K. Edwards, (Fri Dec 8, 8:18 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 8:23 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 1:04 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jeff Garzik, (Fri Dec 8, 1:40 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 12:42 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Lars Hjemli, (Fri Dec 8, 3:49 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 3:51 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Lars Hjemli, (Fri Dec 8, 3:59 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 4:02 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jakub Narebski, (Fri Dec 8, 9:38 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 9:28 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Fri Dec 8, 10:03 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Fri Dec 8, 10:52 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 1:09 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Martin Langhoff, (Sat Dec 9, 1:34 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Sat Dec 9, 12:26 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Rogan Dawes, (Fri Dec 8, 10:31 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Jonas Fonseca, (Fri Dec 8, 11:38 am)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), Olivier Galibert, (Thu Dec 7, 7:50 pm)
Re: kernel.org mirroring (Re: [GIT PULL] MMC update), H. Peter Anvin, (Thu Dec 7, 7:56 pm)