0

Yes, it does depends on use cases. My use case is, I have a generic project of which there are 6 apps, all apps share same google auth session. These apps will be scaling up in few months. I went through many posts to understand which one is preferred and how Django deals with it. Django provides Django Subdomain which requires configuring sites framework. Also there are posts suggesting same for subdirectories.

I am running Django > Gunicorn + Supervisor > Nginx. Few posts I followed which directed everything through Nginx. Two of these posts are: one and two.

There is so much disorientation in understanding what suits best for scaling of use case and which configuration needs to be followed ? Should we follow subdomains or subdirectory ? Where to set configuration in urls.py , settings.py or NGINX for all the routing and static files ?

I understand that this is a big concept and won't fit in single answer. It would be helpful if there's any resource link I can go through.

Thank you for your efforts.

Rakmo
  • 1,926
  • 3
  • 19
  • 37
  • Do you want one Django app instance to serve all websites it supports, under many different subdomains? And do I understand correctly - you're asking what would be the best approach to do this without sacrificing static file performance? – samu Apr 19 '18 at 10:35
  • Second part is completely correct. But regarding the first part of ur question, i want different apps on different subdirectories / subdomain (whichever suits better for large scaled apps), these apps are within one project and should share common login session. – Rakmo Apr 19 '18 at 10:38
  • Both configurations support shared session cookies. Both are scalable. Plug in more servers and use load balancers to distribute traffic. Or, you can even have separate servers for separate apps. Then configure Nginx to reverse proxy an url to the related app server. – xyres Apr 19 '18 at 11:13

0 Answers0