title: Best fast authentication mechanism for embedded devices with Nginx & Apache
body: <p>We have a project deployed with Nginx, Apache, Django and Postgres.</p>
  
  <p>The project has large number of embedded devices login in to the server(https) in 5 minutes intervals and send a file to the server. Also, the WebUI face of the project has normal users login in and performing different functions.</p>
  
  <p>Currently, system doesn't differentiates between the a embedded device and normal(human) user. When the devices number was low, this mechanism was working fine with the required speed. But overtime with increased number of devices the load on the database increased a lot. We observed around 60000 django_session entries per day. The import script that we run to process the files sent from the devices is hardly keeping up with the incoming data and database is heavily loaded. </p>
  
  <p>I want to implement a minimal authentication mechanism which can just authenticate the device very fast and allows it to send the text file. I want to avoid the django authentication way 
  but want to keep using the auth_user table for the username-password for the devices.
  Given performance requirement, I need some way, which uses nginx and doesn't really bring apache into picture and accepts the file. </p>
  
  <p>What you think is the best way to achieve this? Also, what this large embedded devices related projects use for such type of mechanism?</p>