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:
api/ url for api that renders data from db
test/ url for a test page that only returns HttpResponse("Done")
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: mainsite.com/home and we use subdomain like: api.mainsite.com/api or api.mainsite.com/insert for backend