Python Web Programming - looking for examples of solid high-traffic sites

John Nagle nagle at animats.com
Fri May 18 14:15:39 EDT 2007


Alex Martelli wrote:
> Jarek Zgoda <jzgoda at o2.usun.pl> wrote:
> 
> 
>>Daniel Nogradi napisa?(a):
>>
>>
>>>>For example, it HAS been published elsewhere that YouTube uses lighttpd,
>>>>not Apache: <http://trac.lighttpd.net/trac/wiki/PoweredByLighttpd>.
>>>
>>>How do you explain these, then:
>>>
>>>http://www.youtube.com/results.xxx
>>>http://www.youtube.com/results.php
>>>http://www.youtube.com/results.py
>>
>>Server signature is usually configurable.
> 
> 
> Yeah, but I don't know why it's configured it that way.  A good example
> of a question that looks perfectly appropriate for YouTube's OSCON
> session.

    YouTube's home page is PHP.  Try "www.youtube.com/index.php".
That works, while the obvious alternatives don't.
If you look at the page HTML, you'll see things like

      <a href="/login?next=/index.php"
      onclick="_hbLink('LogIn','UtilityLinks');">Log In</a>

So there's definitely PHP inside YouTube.

    If you look at the HTML for YouTube pages, there seem to be two
drastically different styles.  Some pages begin with "<!-- machid: 169 -->",
and have their CSS stored in external files. Those seem to be generated
by PHP.  Other pages start with
"<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">",
with no "machine ID".  It looks like the stuff associated with
accounts and logging in is on the second system (Python?) while the
search and view related functions are on the PHP system.

    Shortly after Google bought YouTube, they replaced YouTube's search
engine (which was terrible) with one of their own.  At that time,
Google search syntax, like "-", started working.  That's probably
when the shift to PHP happened.

					John Nagle



More information about the Python-list mailing list