Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry, I am very new to this whole concept. Basically, I have a Django site. One of the view does a lot of work and leads to the server hanging up due to lack of memory. I want to take the functionality of that view and make it run on another server (Server B), and get the main server (Server A) to communicate with it like as if they both ran on the same server. My first guess Is I need to make Server B listen on a port that Server A can talk to and vice versa.

I'm not asking for a definite answer as this question in itself may be vague. Maybe, I can achieve this better by load balancing etc., I'm not sure. Any links pointing to information about how I can possibly achieve what I want is much appreciated. Thanks

share|improve this question

I'd probably look towards some kind of messaging infrastructure to solve this. Server A can handle the front end requests, and server B can generate the data.

Server A "listens" on a queue for data generated by server B. You should also attempt to cache requests, and generated data so that you aren't regenerating the same data for multiple similar requests.

Server B listens for requests forwarded from the view on server A, processes the data and returns the generated data via the response queue.

Hmm. Things to read.. <- Excellent article on RabbitMQ and python. <- Django view caching. This will help lower your load immensely (especially if you use memcached over disk-based caching, then you get a distributed cache, too.) <- "Building scalable websites" will give you a good insight into some other ways to make your webapp scalable.

share|improve this answer

I'd suggest looking into common uses of Apache's mod_proxy.

Also, along this same path, you might get interested in something like Varnish for caching.

Think hard about ways to break up your application into functional units, if you haven't already, and to reduce the total amount of work done. Can you cache? If you can, do it. :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.