Path Towards Deploying Django
Tags: python, startup, webdev, discuss
Published: 2019-05-26 09:15:05

---
title: Path Towards Deploying Django
published: true
description: Which path should I take in deploying my Django project
tags: python, startup, webdev, discuss
canonical_url: https://www.maxongzb.com/path-towards-deploying-django-reading-time-3-mins/
---

![Photo by Caleb Jones on Unsplash](//images.ctfassets.net/ly2f59p4unnn/7kP4LEVsa1cYyFA4G7S7Pc/21da9b270c92c226a41a46985e97b424/Webp.net-resizeimage.jpg)

# Introduction
Deploying Django has often been a confusing and hard topic for many who are starting out in Django development.

It takes time in playing around with various deployment options to actually get to the right technology or practices in deploying Django projects. 

I will be covering the various ways to deploy your Django web application, I hope it might be useful for anyone who is starting out.

# Common Questions to Deploy
Literally, it comes down to three questions you should ask yourself whenever you are looking to deploy a Django project.

* What is the cost to deploy?
* Do you require it to scale?
* How long do you plan to maintain it?

Do note that for the sake of convenience and you are the only person. Who is responsible for deploying your Django project.

Just go for cloud providers like [Heroku][1], [Linode][2] or [DigitalOcean][3] as it will be an overkill to do it.

# What is the cost to deploy?
By paying for the convenience through the use of **cloud providers** like [Heroku][1], [Linode][2], [DigitalOcean][3] or [Python Anywhere][4].

Do note that if you plan to drive down the cost to deploy **significantly**, you need to understand the various technologies associated with making the process easier. 

This does include the cost for **maintenance** of the deployment process and **monitoring** the health of your server. 

To prevent it from crashing if your server has been overloaded through multiple requests or DDoS attacks.

# Do You Require It to Scale?
You need to estimate what is the number of monthly users for your architecture when you are planning to deploy for your Django application. 

There is a massive difference between scaling for ten thousands or hundred thousands of monthly users vs scaling it for one million monthly users. 

The amount of scale and architecture changes required dramatically leads to the realms of [Developer Operations (DevOps)][5] or [Site Reliability Engineer (SRE)][6]. 

Which uses many tools & practices, this even takes from the playbook of [IT service management][7] to maintain the availability and performance of your Django project. 

Which I'm pretty sure is not taught often as part of software development. 

To have a glimpse of how to scale Django, I would suggest looking at the book called [High-Performance Django][8]. 

This was heavily recommended by [PyDanny][9] the author for [Two Scoops of Django][10].

That I had used it as part of a reference guide when I was starting out to learn to develop in Django.

# How Long Do You Plan To Maintain It?
It is not easy to maintain a deployment infrastructure for Django by just following DevOps practices or adopting technology like [Zappa][11] or [Docker][12].

It could take weeks or months of your time to refine and running smoothly. If you are interested in the experience in deploying Django in the production environment. 

I came across **Randall Degges** in his article [Deploying Django][13] to deploy for a startup I am currently in.   

Which was way before we pick up CI/CD practices and the use of Docker containers to make deployment and development much easier for us.

# Conclusion
I hope that this article is helpful for anyone who is developing in Django and looking towards the deployment.

If you are just the only person, who is deploying the Django project you can take a look at using cloud providers or use [Zappa][11] that taps on the AWS Lambda and API Gateway for deploying your Django project using AWS.

Lastly, Before deploying your Django web application or REST API endpoints to your production environment look at [Deployment Checklist][14] and [Security In Django][15] before deploying to prevent security breaches.

If you like my article, please **sign up** for Max [Adventurer's Newsletter](http://eepurl.com/dOUoUb) for awesome content I stumble across weekly in **Python**, **Startup** and **Web Development**.

You can also **follow** me to get the **latest** update of my article on **Dev** 

This post was originally posted on Max's blog at [Path Towards Deploying Django - Reading Time: 3 Mins](https://www.maxongzb.com/path-towards-deploying-django-reading-time-3-mins/) and [Photo by Caleb Jones on Unsplash](https://unsplash.com/photos/J3JMyXWQHXU)

# References
* [High Performance Django][8]
* [Two Scoops of Django][10]
* [Zappa][16]
* [Deploying Django][13]
* [DevOps Django - Part 1][17]
* [Deployment Checklist][14]
* [Security In Django][15]


[1]: https://www.heroku.com/
[2]: https://www.linode.com/
[3]: https://www.digitalocean.com/
[4]: https://www.pythonanywhere.com/
[5]: https://aws.amazon.com/devops/what-is-devops/
[6]: https://landing.google.com/sre/interview/ben-treynor/
[7]: https://freshservice.com/itsm
[8]: https://highperformancedjango.com/
[9]: https://www.amazon.com/gp/customer-reviews/R3TZ5O2XFB8OM/ref=cm_cr_dp_d_rvw_ttl?ie=UTF8&ASIN=1508748128
[10]: https://www.twoscoopspress.com/
[11]: https://github.com/Miserlou/Zappa
[12]: https://www.docker.com/
[13]: https://www.rdegges.com/2011/deploying-django/
[14]: https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
[15]: https://docs.djangoproject.com/en/2.2/topics/security/
[16]: https://github.com/Miserlou/Zappa#about
[17]: https://www.rdegges.com/2011/devops-django-part-1-goals/