0

I'm currently using CentOS (512 RAM, Dual-core CPU) for my website. Here are the specs:

  • Django 1.3.1
  • Python 2.7.2
  • Apache 2 with mod_wsgi 3.3
  • MySQL 5 (about 5,000 records)
  • Memcached (120 MB for running)
  • Nginx for serving the static content

When my site has 2,000 visitors at the same time, the CPU usage reachs about 40% of total. And with 10K visitors, CPU is 90%-100%. The site is very slow. I've tried to cache in database but not working.

I could migrate to new larger server but it will be a waste. Because my site just reachs that large amount in 1-2 days of week.

Any idea for this? Thanks!

2
  • Can you clarify why scaling the server would be a waste? I'm a little surprised that an Python-backed Apache site on such a small server is performing that well. Feb 19, 2012 at 8:56
  • Why not? I'm using Linode.com plan 1 for this site.
    – anhtran
    Feb 19, 2012 at 11:33

1 Answer 1

1

Have you considered using uWSGI ?

According to my experience and this website , it beats all other setup when proxied behind nginx.

There are many blog posts regarding the setup of uWSGI behind nginx eg http://www.jeremybowers.com/blog/post/5/django-nginx-and-uwsgi-production-serving-millions-page-views/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .