DISQUS

bart's blog: Setting up nginx as a front end for your Django / Python website.

  • jperras · 8 months ago
    Why not use the wsgi nginx module and ditch apache altogether?
  • Bartek · 8 months ago
    This is an option as I mentioned, but I just simply chose to use mod_wsgi. My reasons primarily fall under the "tested & true" category but also that I wanted to propose a more gradual switch for current Apache users instead of a full out change. Hope that makes sense :)
  • Graham Dumpleton · 8 months ago
    For why you were most likely experiencing problems with mod_python, see:

    http://blog.dscpl.com.au/2009/03/load-spikes-an...
  • Bartek · 8 months ago
    Thanks for the link. The article does touch base on some of the things I experienced but not entirely.

    I think my main problem with Apache was that I was hosting both Python and PHP based sites on the same 256mb slice. As soon as I brought on some bigger sites into my slice, things went crazy.

    I did try a number of solutions, including switching to the Apache worker MPM as well as trying all sorts of Apache configurations but it did no luck. There was improvement, but load was still up.

    Perhaps there is a solution to my issue using a sleak Apache config that can handle both environments but I could not find it.

    After working with nginx, I personally enjoy the idea of a multi-server approach where I can proxy requests off to whatever I see fit, seems like an easier approach when it comes to scaling.
  • rogerdpack · 8 months ago
    sorry for the spam, but being a VPS user myself, I'd recommend one that can give you a 32 bit OS--saves on memory (you said you were swapping?)
    Thanks for the post!
    -=r
  • Bartek · 8 months ago
    You know, never thought of that. Good point, but wouldn't you say that we should actually work towards moving to 64 bit systems? I am no expert on the subject but I've seen some very passionate people denounce 32-bit systems because they are "old hat" now :)
  • rogerdpack · 7 months ago
    hmmm...yeah I would probably prefer 64 bit if it weren't for the fact that they 32 uses so much less memory. But they both work equally well it would appear, these days...so I guess if you have "very little" RAM go for 32 bit, if you have "tons and tons" then you [have to] go for 64 bit :)
    -=r