How scalable is Django?
21st August 2013
My answer to How scalable is Django? on Quora
Django scales in exactly the same way as PHP or Rails or any other stateless shared-nothing web technology: you ensure that the web nodes (running your Django code) are independent from your persistence layer (database, caching, session storage etc) and scale then independently.
Since the Django web nodes have no stored state, they scale horizontally—just fire up more of then when you need them. Being able to do this is the essence of good scalability.
In my experience Java applications are more likely than Python applications to have stateful web servers which fail to scale horizontally, hence the more common need for things like load balances that support sticky sessions in the Java world.
That’s not to say you can’t have stateless Java web application servers that scale horizontally if you set out to do so—you just need to be disciplined about it.
Performance is another matter entirely: Java is generally faster than Python, and some aspects of Django (such as the template language) are actually quite slow. But performance and scalability are not the same thing.
More recent articles
- Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - 23rd April 2024
- Options for accessing Llama 3 from the terminal using LLM - 22nd April 2024
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024