You will find there's project used with Nginx, Apache, Django and Postgres.
The project has many embedded products login to the server(https) in five minutes times and send personal files towards the server. Also, the WebUI face from the project has normal customers login in and carrying out different functions.
Presently, system does not distinguishes between your a embedded tool and normal(human) user. Once the products number was low, this mechanism was working fine using the needed speed. But overtime with elevated quantity of products the burden around the database elevated a great deal. We observed around 60000 django_session records daily. The import script that people go to process the files sent in the products is hardly maintaining using the incoming data and database is heavily loaded.
I wish to implement a small authentication mechanism which could just authenticate the unit extremely fast and enables it to transmit the written text file. I wish to steer clear of the django authentication way but wish to keep while using auth_user table for that username-password for that products. Given performance requirement, I want a way, which uses nginx and does not really bring apache into picture and accepts the file.
What you believe is the easiest method to accomplish this? Also, what this huge embedded products related projects use for this particular mechanism?
In order i realize it each embedded device includes a user account setup in django and you want to avert this overhead.
First an issue, so how exactly does the rear finish know when its speaking to some embedded device or perhaps a human user? I'd possess a assume this post is baked into django system.
If what exactly you must do is intercept the consumer title and password before it will get passed to django, look for the kind of account within the database and when its an embedded device pass it to some handling application that does only accept the files and process them. The way you intercept this can be you, you could do this it in any 'web' language you want and merely use redirects when you have made the decision how to deal with the traffic.
If you achieve the chance to rewrite this, why actually have a user title password for that embedded device? presuming it's an embedded device (single purpose minimal interface) then is not checking its SSL certificate against a listing of known certificates enough to recognize it? This might remove any interaction using the django system whatsoever as all that you should do is look into the cert against a bank of known ok certs.
Are you able to write a put together cgi script (in C or C++?) that authenticates the embedded products from the Postgres database directly, and stores the file within an appropriate manner? You clearly have no need for periods, because the embedded device constitutes a one-time connection every a few minutes.
I'm not sure much about Django (selected this up in the embedded tag), so I'm not sure what's accountable for its overhead.
It really is not way too hard to create a CGI script in C (presuming you or someone in your team knows C) with this simple task.