Djnago waiting for server response time problem in production

i have a django app that its main purpose is to make an api .

it has:

  1. api/ url for api that renders data from db

  2. test/ url for a test page that only returns HttpResponse("Done")

  3. insert/ url for inserting data to db

the speed is ok(255 ms) in development but it's sometimes fast (260 ms) and most of the time slow(30-40 s) in production even for loading that test page which only shows a single word.

is this problem related to the code or to the hosting provider?

note: we use react for frontend and routes are like: and we use subdomain like: or for backend

Back to Top