We have a project deployed with Nginx, Apache, Django and Postgres.
The project has a large number of built-in devices for entering the server (https) after 5 minutes and sending the file to the server. In addition, on the front side of the WebUI project there are regular users who log into the system and perform various functions.
Currently, the system does not distinguish between the embedded device and the general user. When the number of devices was low, this mechanism worked normally at the required speed. But overtime work with an increase in the number of devices significantly increased the load on the database. We watched about 60,000 django_session entries per day. The import script that we run to process files sent from devices is unlikely to match the incoming data, and the database is heavily loaded.
I want to implement a minimal authentication mechanism that can simply quickly authenticate a device and allow it to send a text file. I want to avoid the django authentication method but want to continue to use the auth_user table for the username and password for devices. Given the performance requirements, I need some way that uses nginx and doesn't bring apache to the image and accept the file.
What do you think is the best way to achieve this? In addition, what projects related to large embedded devices are used for this type of mechanism?
Sujit source share