There is a problem, came on a new project and here a simple query to get 1500 records from the database is 3.2 seconds(Sotho search without transfer). Can't find the cause. On old projects worked much faster. Tell me what could be the reason.
Tag see mongoose. A couple of tips for working with it: try to play with the limit fields using find().select(/* object fields */). By default, mongoose returns the collection of your wrapper over the JS objects that are quite heavy. To POJO, you can use find().lean(). Not to wait until you return the entire collection of 1500 records you can use cursors with streams and work with data in batches.
But it's really hard to say what the problem is - iron is really not bad, but the problem is most likely in the IO loop, as is usually the case, depending on the number of nodes between the client, server, and database server. Maybe you have a proxy server stands in front and does not pull under load, maybe the server is overloaded with requests and you wait in line, can database a lot of connections and you're, again, waiting.