3 ms·
We are using ndjson. It is pretty good for our case of processing couple of terabytes of 1kB-20kB documents daily. Some of the calls return millions of objects
by lmilcin 5y ago
We are using ndjson. It is pretty good for our case of processing couple of terabytes of 1kB-20kB documents daily.
Some of the calls return millions of objects. In such cases we opt to return very small amount of information (ideally just ID) and have the client batch responses and direct batches of IDs to another endpoint to fetch full documents, with response also streamed using ndjson.
But there is nothing wrong with returning entire 20GB of data except that the client gets no other option than wait for entire set being returned through a single connection.