I encountered a problem. The web side requested a picture, but the picture was modified dozens of times per second on the server side.
Server-side nodejs uses fs.createReadStream(image_path).pipe(response);
to return images.
I tested the python single thread to modify the image 10 times per second.
When the web side requests the image, the request will not be available. Only small data can be requested, and it will not continue to come after continuing to wait. The stream is flowing
I can only try F5 frequently to try my luck
Is there any way to process it in the backend so that the frontend can definitely get this picture?
漂亮男人2017-05-16 13:36:38
Don’t use stream if you make frequent modifications. Pictures can be read into the memory using the synchronous method and then passed to the client