Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django Virtualenv production tradeoffs

Are there any tradeoffs (memory, performance etc) while deploying Django in production with virtualenv?

I like how it's all sandboxed and clean but can't seem to find any performance info.

Any direction would be nice.

Thanks,

like image 834
slow_mondays Avatar asked Apr 19 '12 14:04

slow_mondays


People also ask

Should I use virtualenv production?

Is virtualenv recommended for django production server? Yes, it makes your project not depend on certain aspects of the system environment and also it allows you to make the deployment process more clear and configurable. I use fabric, pip and virtualenv to deploy all my Django projects.

Is Django good for production?

High-level: When to use DjangoIf you can check even a few of the statements below (without strongly disagreeing with any), chances are that Django is good for your project. You need to develop a web app or API backend. You need to move fast, deploy fast, and also make changes as you move ahead.

Should I use virtualenv for Django?

The virtual environment is an environment which is used by Django to execute an application. It is recommended to create and execute a Django application in a separate environment. Python provides a tool virtualenv to create an isolated Python environment.

Is virtualenv deprecated?

The ActiveState Platform is a modern solution to dependency management. Virtualenv has been deprecated in Python 3.8.


1 Answers

There is no natural difference between env managed by Virtualenv and those not using it: just different filesystem directories and Python paths. Furthermore, Virtualenv saves our Dev's time by providing sandbox-env you mentioned, allowing flexible configuration of envs and switching between them on single node, exempting requirement of sudo... which, IMO, is big 'performance' gain.

like image 110
okm Avatar answered Sep 21 '22 12:09

okm