We have large data in ES, we send request with the size limit: 1,000 and we do pagination to get remaining results.
Sometimes we get 502 bad gateway, hard to debug what went wrong.
I assumed if the response size is too large maybe the server is failing to serve it.
Also we do aggregation with the size limit: 10 000.
- What is the recommended size for es query and aggregation?
- How should we handle aggregation queries when we do pagination?