ad-hominem
> # he installs everything globally rather than using virtualenv
on single-purpose servers it's not so important. still good practice,
but not mandatory.
> # he uses apache instead of... well... anything else
well-tuned apache and mod_wsgi is on the same league as the cool boys.
(i still prefer nginx, and i don't think this is a good example of
apache tuning, but nothing bad about it)
> # there does not appear to be anything in there that is specific to
> ec2
point conceded, but lots of people will look for EC2 instructions,
even if it's just "just like any old server"
> Bonus reason:
> # he uses mysql instead of postgres
again, might not be the bestest choice but nowhere near a bad one.
--
Javier
On Thu, Jan 12, 2012 at 9:54 AM, Stuart Laughlin <stu...@bistrotech.net> wrote:
> # author admits he is a non-sysadmin noobad-hominem
well-tuned apache and mod_wsgi is on the same league as the cool boys.
(i still prefer nginx, and i don't think this is a good example of
apache tuning, but nothing bad about it)
> Bonus reason:> # he uses mysql instead of postgres
again, might not be the bestest choice but nowhere near a bad one.
--To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ByBrEdUj8HUJ.
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
* http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
* http://www.saltycrane.com/blog/2010/10/how-install-pil-ubuntu/
* http://brandonkonkle.com/blog/2010/jun/25/provisioning-new-ubuntu-server-django/
Hope that helps,
--Stuart
2012/1/12 Stuart Laughlin <stu...@bistrotech.net>:
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/ByBrEdUj8HUJ.
>
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
--
Andrés Reyes Monge
arm...@gmail.com
+(505)-8873-7217
Despite the relentless attacks from people who have some sort of
grudge against Apache, I'd remind any readers that Apache is the most
used and trusted web server on the internet. It forms an integral part
of the technology that the company I work for is built around, and
performs extremely well for our usage, and I would thoroughly
recommend it.
Besides which, arguing about which web server is more efficient is a
clear indicator that you are concentrating on the wrong areas. nginx
or lighthttpd vs apache is meaningless when your the bottleneck will
always be the python application and/or DB server.
Cheers
Tom
--Stuart
--
You received this message because you are subscribed to the Google Groups "Django users" group.
I don't know what causes it, however this view - that lighty, nginx or
cherokee are higher performing than Apache - is just nonsense. It gets
rolled out whenever someone decides not to use Apache, and is without
basis in fact. Apache is also designed for extremely light weight
processes, if you configure it thus.
[Side note - none of this is personal to you! I'm not trying to say
that you are the fore-front of a horde of rabid anti-Apache-ism, it's
just a common view that is propagated that really winds me up!]
Apache covers almost every scenario related to HTTP, but commonly the
particular version that a distro will package up is not necessarily
the version that is correct for your particular scenario. Commonly, it
will come with every bell and whistle enabled, and using a
safe-but-slow request processing model, to accommodate mod_php.
What happens is that someone who does not know how to use Apache uses
the stock version supplied by their distro, leaves all features
enabled, and then benchmarks it against lighty with a minimal
configuration, and draws incorrect conclusions.
It's similar to benchmarking a Mercedes with a manual transmission
against a Ford with an automatic transmission, driving the Mercedes
only in first gear and concluding that the Ford is faster.
> I'm not concerned with micro-performance enhancements. Nginx is
> clearly more efficient and performant than apache, but my main concern
> is being able to diagnose problems when they arise. I used apache/
> mod_wsgi for my first few production deployments, and it was a very
> unpleasant experience -- weird memory usage statistics, users getting
> intermittent error messages, etc. -- and tracking down the problem was
> basically impossible. I found apache to be an opaque black box. The
> only thing that saved me was Graham Dumpleton sweeping in to rescue me
> with the perfect mod_wsgi config. He's the killer feature of django on
> apache as far as I'm concerned.
>
Memory usage is one of the more common non-complaints aimed at Apache.
Apache does not usually leak memory, and process sizes normally stay
consistent for long long periods. The only time this does not happen
is when you embed a language interpreter and application inside
Apache, and that leaks. This is typical when running with mod_wsgi
embedded mode, and I would guess that Graham had you change your setup
to daemon mode.
I would also say that Apache is a complex beast - there are lots of
options and modules. It also has a very responsive and helpful support
community. If anyone using Django needs help with any aspect of
Apache, try us...@httpd.org .
Cheers
Tom
PS: I would agree that Graham is one of the top features of Apache :)
His mod_wsgi is excellent, and his support for Django is very
admirable, given that (IIRC) he doesn't actually use it himself much!
and Disqus agrees with that. check slide 14 of their 'Scaling
Disqus'[1] presentation at PyCon2011
[1] http://www.slideshare.net/zeeg/pycon-2011-scaling-disqus-7251315
--
Javier
The slide you reference shows two graphs comparing apache + mod_wsgi
with nginx + uwsgi. The graphs demonstrate that according to their
tests the two are roughly equal in terms of requests-per-second and
memory size. They conclude that the application (not the web server)
is the bottleneck and recommend that people use what they're
comfortable with.
I don't construe that as Disqus officially preferring apache, but you
are certainly entitled to your own interpretation.
Regards,
--Stuart
right. their commentary at the PyCon (from memory, i haven't checked
the video) was something like "why apache and not nginx or anything
else? well... it's the same thing. get over it"
--
Javier
You referenced Graham’s “The Perfect Config”. I’ve been googling without success to find that. Do you have a link?
From: django...@googlegroups.com [mailto:django...@googlegroups.com] On Behalf Of Stuart Laughlin
Sent: Friday, January 13, 2012 12:52 PM
To: django...@googlegroups.com
Subject: Re: Web Servers for Django Projects [WAS: Does anyone know any blogs...]
Snip
he means Graham's config is perfect. Google for django+wsgi
--
regards
Kenneth Gonsalves
Graham turned up on a thread in another forum where I was asking about how to fix a strange error I had been seeing intermittently for months. He instructed me on how to put mod-wsgi into daemon mode, among other things, and finally solved my problem.
Here's a link to the thread, if you're interested.
http://groups.google.com/group/satchmo-users/browse_thread/thread/6a65b4ab28df38dc/a9b22c236d63c323
--Stuart
You're inventing words that you think I said. The 'default' config is
entirely appropriate for django apps, it is however not high
performance.
I say 'default', because it is only the default on certain OS. On the
platform we serve on, FreeBSD, it is a simple choice which MPM to
choose, and the default configuration for Apache configured with
worker or event MPM is entirely on par with nginx/lighty.
On top of that, you get all the advantages of being part of the Apache
ecosystem. Apache 2.4.0 will be released this week (probably), with a
mass of enhancements:
http://httpd.apache.org/docs/trunk/new_features_2_4.html
I'd thoroughly recommend not ignoring Apache in search of the new cool.
Cheers
Tom
Fair enough, Tom.
"The default config of apache on certain operating systems (e.g. most
linux distros) will not yield high performance for your django apps."
I suspect it was my unqualified usage of the nebulous phrase "not
appropriate" that prompted you to accuse me of "inventing words that
[I] think [you] said," but in fact the more clearly stated proposition
above is what I had in mind in the first place.
Regards,
--Stuart
It runs on EC2 and you get all the advantges of EC2.
http://olddocs.dotcloud.com/tutorials/django/
On Thu, Jan 12, 2012 at 12:31 AM, Chen Xu <xuch...@gmail.com> wrote:
> Hi, everyone:
> Does anyone know any blogs that write about how to quickly install and
> deploy a django application on Amazon EC2?
>
>
> Thanks very much
> Best regards
>
> --
> ⚡ Chen Xu ⚡