I am using dgraph standalone setup & I am testing my node back-end that is connected to dgraph standalone with wrk
and I am getting this response from dgraph: Dgraph query failed because Dgraph execution failed because 429 Too Many Requests. Please throttle your requests
. So clearly the bottleneck in here is dgraph itself. Why is this happening & How to improve or solve this problem?
I am using this command: wrk -t1 -c1 -d1s <my node app api endpoint>
.
-t
stands for threads and -c
stands for number of connections and -d
for duration.
Node: There is only one input in database.
Schema:
type User {
id: ID!
name: String
username: String! @id
}
Running 2s test @ http://localhost:3003/api/users
2 threads and 2 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.58ms 1.10ms 12.67ms 81.67%
Req/Sec 219.52 17.62 250.00 65.00%
875 requests in 2.00s, 231.57KB read
Non-2xx or 3xx responses: 875
Requests/sec: 436.92
Transfer/sec: 115.63KB