Hey, with the possible of not knowing how to do a proper job when it comes to nodejs “API/app/service” I would like to ask some opinions on how to scale and design a nodejs app in the following scenario:
Given:
- an API that has one endpoint (GET) that needs to send the quite large response to a consumer, let’s say 20mb of json data before compression
- data is user specific and not cachable
- pagination / reducing the response size is not possible at the moment
- how the final response is computed by the app it’s not relevant for now 😅
Question:
- with the conditions described above, did anyone have a similar problem and how did you solved it or what trade offs did you do?
Context: I have an express...
Hey, with the possible of not knowing how to do a proper job when it comes to nodejs “API/app/service” I would like to ask some opinions on how to scale and design a nodejs app in the following scenario:
Given:
- an API that has one endpoint (GET) that needs to send the quite large response to a consumer, let’s say 20mb of json data before compression
- data is user specific and not cachable
- pagination / reducing the response size is not possible at the moment
- how the final response is computed by the app it’s not relevant for now 😅
Question:
- with the conditions described above, did anyone have a similar problem and how did you solved it or what trade offs did you do?
Context: I have an express app that does a lot of things and the response size looks to be one of the bottlenecks, more precisely expressjs’s response.send, mainly because express does a json.stringfy so this create a sync operation that with lots of requests coming to a single nodejs instance would create a delay in event loop tasks processing (delays)
I know i can ask chatgpt or read the docs but I’m curious if someone had something similar and have some advice on how did they handled it.